Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

jQuery Untils: nextUntil, prevUntil, parentsUntil

branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 docs
Octocat-spinner-32 examples
Octocat-spinner-32 shared
Octocat-spinner-32 unit
Octocat-spinner-32 LICENSE-GPL
Octocat-spinner-32 LICENSE-MIT
Octocat-spinner-32 README.markdown

jQuery Untils: nextUntil, prevUntil, parentsUntil

Version: v1.1, Last updated: 2/18/2010

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".

As of jQuery 1.4, these methods are now included in jQuery core! See the patch as well as the official documentation on the .prevUntil, .nextUntil and .parentsUntil methods.

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.

Visit the project page for more information and usage examples!



These working examples, complete with fully commented code, illustrate a few ways in which this plugin can be used.

Support and Testing

Information about what version or versions of jQuery this plugin has been tested with, what browsers it has been tested in, and where the unit tests reside (so you can test it yourself).

jQuery Versions


Browsers Tested

Internet Explorer 6-8, Firefox 2-3.7, Safari 3-4, Chrome 4-5, Opera 9.6-10.1.

Unit Tests

Release History

1.1 - (2/18/2010) Fixed an issue that occurred when until_selector and each_selector were mutually exclusive. In the process, simplified plugin logic substantially.
1.0 - (12/1/2009) Initial release


Copyright (c) 2010 "Cowboy" Ben Alman
Dual licensed under the MIT and GPL licenses.

Something went wrong with that request. Please try again.