jQuery-GetPath - Determine an element’s ancestors with jQuery

jQuery-GetPath is a plugin for the jQuery JavaScript library for determining an element’s ancestors.


Author

Dave Cardwell (jQuery plugins)


Usage

var path = $('#foo).getPath();
// e.g., "html > body > div#bar > ul#abc.def.ghi > li#foo"

Download

jQuery-GetPath is licensed under the MIT licenses.

If you find a use for jQuery-GetPath I’d love to hear about it. Also, a link to this site wouldn’t go amiss!

You can download the plugin, uncompressed, at jquery-getpath.js at 1K.