Published in: JavaScript
Then, your code should look like this ...
$(document).ready(function() { $("dt > a").click(function(){ $(this).parent().nextUntil('dt').toggle(); return false; }); });
Expand |
Embed | Plain Text
/******** next until > ****************/ $.fn.nextUntil = function(expr) { var match = []; // We need to figure out which elements to push onto the array this.each(function(){ // Traverse through the sibling nodes for( var i = this.nextSibling; i; i = i.nextSibling ) { // Make sure that we're only dealing with elements if ( i.nodeType != 1 ) continue; // If we find a match then we need to stop if ( jQuery.filter( expr, [i] ).r.length ) break; // Otherwise, add it on to the stack match.push( i ); } }); return this.pushStack( match, arguments ); }; /******** < next until ****************/
Comments
Subscribe to comments
You need to login to post a comment.

Abercrombie And Fitch Abercrombie And Fitch Abercrombie AbercrombieAbercrombie Clothing Abercrombie Clothing Abercrombie UK Abercrombie UK Abercrombie London Abercrombie London Abercrombie Fitch Abercrombie Fitch Abercrombie Outlet Abercrombie Outlet Abercrombie Jeans Abercrombie Jeans Abercrombie Pants Abercrombie Pants Abercrombie Tees Abercrombie Tees Abercrombie Shorts Abercrombie Shorts Abercrombie Sweater Abercrombie Sweater Abercrombie Outerwear Abercrombie Outerwear Abercrombie Hoodies Abercrombie Hoodies Abercrombie Polo Abercrombie Polo Abercrombie ShirtsAbercrombie Shirts abercrombie henleys crew abercrombie henleys crew hollister hollister hollister uk hollister uk abercrombie mens abercrombie mens abercrombie womens abercrombie womens Ruehl 925 Ruehl 925 ed hardy ed hardy tiffany tiffany Abercrombie And Fitch Abercrombie And Fitch