I am using the following selector for an each loop in jQuery:
$("#myid").parents().andSelf().each(function({}) The selector returns an object like this:
object[html, body, div#global_container, div#content, div#myarea, span.myclass, div#myid] That means the each loop will start with the furthest parent and then eventually ends with self
How can I reverse that order so that the each loop will start with self and work its way up the dom tree instead of down?