Q: How to find all elements of a given class not in a particular id container using jQuery Its probably simple but I am not able to do it. I want to find and select all elements of a class which are not contained under a given id.
For Example: Below here, how to find elements of class "me" outside id "con"
<div id="con">
    <div class="me">hi1</div>
    <div class="me">hi2</div>
</div>
    <div class="me">hi3</div>
    <div class="me">hi4</div>


A: $(".me").not("#con .me");

Using not() you can specify a selector that the elements should not match.
http://jsfiddle.net/AufVD/

This could also be written as:
$(".me:not(#con .me)"); 

http://jsfiddle.net/AufVD/1/

A: you can use 
$('.me:not(#con)')​​​
or
$('.me').not('#con')

