jQuery Untils v1.0
A while back, I coded up a very basic nextUntil method, but it felt a bit simplistic. I felt that I could code a slightly more “general” solution that actually sorted correctly.. so here’s the result:
jQuery Untils provides three very simple, but very useful methods: nextUntil, prevUntil, and parentsUntil. These methods are based on their nextAll, prevAll, and parents counterparts, except that they allow you to stop when a certain selector is reached. Elements are returned in “traversal order”.
Note that these methods take a less naïve approach than others bearing the same names, and are designed to actually return elements in traversal order, despite the element ordering flaws inherent in the jQuery 1.3.2 selector engine. A ticket and patch have been submitted to the jQuery team for hopeful inclusion in the 1.4 release.
Check out the documentation and examples at the plugin page, and let me know what you think in the comments!
Post A Comment
Your generous donation encourages me to continue developing and updating my code!
All Featured Projects
jQuery: BBQ, Bookmarklet Generator, cond, doTimeout, equalizeBottoms, getObject, hashchange event, iff, longUrl, Message Queuing, Misc plugins, outside events, postMessage, replaceText, resize event, Star Wipe, throttle / debounce, Untils, unwrap, URL Utils, urlInternal