I have a problem: I want to get all elements with class dirty not below a dirty element 🙂 As you can guess it’s used to refresh contents of viewports.
My take so far:
$(".dirty").not(".dirty .dirty")
Is there a better approach?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The most simplest way is by using the jQuery
:notselector.In your case:
Here’s a jsFiddle
Explaining the
:notselector:Take a look at the CSS3
:notselector on W3Schools and the jQuery page for better understanding.