/ Published in: jQuery
use like this, for example: $('h2').selectUntil('h2').show()
Expand |
Embed | Plain Text
(function( $ ){ $.fn.selectUntil = function(stopper) { returnEl = this; this.nextAll().each(function(){ if($(this).is(stopper)) return false; else returnEl = returnEl.add(this); }) return returnEl; }; })( jQuery );
You need to login to post a comment.
