Use the not
selector.
Example:
$('.collapsiblock').click(function(){
$('.collapsiblock').not(this).each(function(){
$(this).slideUp();
});
$(this).slideDown();
})
More Related Contents:
- How to create a jQuery plugin with methods?
- jQuery: Check if div with certain class name exists
- How to get an element by its href in jquery?
- jQuery+JavaScript: Create custom ajax call function with single object as argument [closed]
- How to disable scrolling temporarily?
- jqGrid does not render correctly in Chrome/Chrome Frame
- How to clone and change id?
- jQuery post() with serialize and extra data
- Clear Text Selection with JavaScript
- Triggering a JavaScript click() event at specific coordinates
- Listening for Youtube Event in JavaScript or jQuery
- How to get html elements from an object tag?
- jQuery selector doesn’t update after dynamically adding new elements
- How do I remove javascript validation from my eclipse project?
- How can I detect browser type using jQuery?
- get a list of all folders in directory [closed]
- Using javascript and jquery, to populate related select boxes with array structure
- Is it OK to add your own attributes to HTML elements? [duplicate]
- Scale a div to fit in window but preserve aspect ratio
- How to Determine if ::before is applied to an element?
- Submit form after calling e.preventDefault()
- Age from Date of Birth using JQuery
- one document.createElement, append it twice, only shows once
- Change form values after submit button pressed
- How to write into a file (in user directory) using JavaScript?
- Submit jQuery UI dialog on
- Put quotes around a variable string in JavaScript
- How to show loading status in percentage for ajax response?
- jQuery on the fly URL shortener
- google visualization-Click event