I am in the middle of writing a plugin, and I would like to get the original selector that jQuery used to create the object.
So, if you wanted to apply something like .siblings() , you could get all siblings of this type, regardless of whether they are looking for siblings of a particular class or siblings of a particular type of element.
jQuery('div') - 'div'jQuery(jQuery('div')) - object [jQuery] // requires a recursive search for the selector of thisjQuery('#elment') - '#element'jQuery('.class') - '.class'
source share