You can use the .not()
method or :not()
selector
Code based on your example:
$("ul#list li").not(".active") // not method
$("ul#list li:not(.active)") // not selector
More Related Contents:
- How to select all images using jquery and give them an width?
- jQuery – What are differences between $(document).ready and $(window).load?
- How can I find elements by text content with jQuery?
- Calculating text width
- iframe to Only Show a Certain Part of the Page
- How to set data attributes in HTML elements
- jQuery html() in Firefox (uses .innerHTML) ignores DOM changes
- Activate CSS3 animation when the content scrolls into view
- Django dependent select
- Jquery datepicker restrict dates in second date field based on selected date in first date field
- How to detect new element creation in jQuery?
- How to bind to localStorage change event using jQuery for all browsers?
- jQuery: height()/width() and “display:none”
- How do I scroll a row of a table into view (element.scrollintoView) using jQuery?
- Synchronous XMLHttpRequest warning and
- Selecting only first-level elements in jquery
- How to add a Not Equal To rule in jQuery.validation
- How do I get the height of a div’s full content with jQuery?
- Use Bootstrap 3 dropdown menu as context menu
- Select link by text (exact match)
- jQuery Animation – Smooth Size Transition
- A cleaner way to select by multiple possible attribute values?
- Get mouse position on scroll
- jquery can’t get data attribute value
- jQuery toggle animation
- Animate counter when in viewport
- jQuery-Select list option hover
- Cordova 3.4 iOS white screen after splash
- jQuery autohide element after 5 seconds
- How do I select the parent form based on which submit button is clicked?