You can reverse the selected elements in jQuery using get and reverse methods.
Just use get and reverse with any jQuery selectors like
Live Demo.
Just use get and reverse with any jQuery selectors like
$($("ANY_JQUERY_SELECTOR").get().reverse())For example
$("tr")Will select all tr elements in order of appearance while
$($("tr").get().reverse())will select the elements in reverse order of appearance.
Live Demo.
No comments:
Post a Comment