jQuery 1.4 now has the .nextUntil(selector) function:
$('div.parent').toggle(
function() {
$(this).nextUntil('div.parent').hide();
},
function() {
$(this).nextUntil('div.parent').show();
}
);
More Related Contents:
- jQuery how to find an element based on a data-attribute value?
- Why is my jQuery :not() selector not working in CSS?
- Access the css “:after” selector with jQuery [duplicate]
- use jQuery’s find() on JSON object
- Jquery bind double click and single click separately
- jQuery or CSS selector to select all IDs that start with some string [duplicate]
- Toggle Checkboxes on/off
- jQuery select all except first
- Selecting elements with a certain background color
- Does jQuery do any kind of caching of “selectors”?
- jQuery :contains selector to search for multiple strings
- Multiple selector chaining in jQuery?
- Efficient, concise way to find next matching sibling?
- jQuery scrollTop not working in Chrome but working in Firefox
- First word selector
- jQuery select by class VS select by attribute
- How to check if an element does NOT have a specific class?
- jquery – Select all elements after a certain element
- How do I get a jQuery selector’s expression as text?
- A cleaner way to select by multiple possible attribute values?
- Get the current jQuery selector string?
- jQuery: select all elements of a given class, except for a particular Id
- How to select elements which do not have a specific child element with JQuery
- How to detect if a browser is Chrome using jQuery?
- jQuery mobile- For every live tap event should there be an equivalent click event?
- Performance of jQuery selector with context
- How to select a table column with jQuery
- How to use multiple jquery object variables as selectors?
- Performance of jQuery selectors vs local variables
- Can jQuery selectors be used with DOM mutation observers?