Skip to content

Instantly share code, notes, and snippets.

@egulhan
Created April 30, 2015 09:07
Show Gist options
  • Select an option

  • Save egulhan/e9b21473d9d1793b05d2 to your computer and use it in GitHub Desktop.

Select an option

Save egulhan/e9b21473d9d1793b05d2 to your computer and use it in GitHub Desktop.
How to use javascript reverse function after seleting elements by using jquery
// @source: http://stackoverflow.com/a/5386150
jQuery.fn.reverse = [].reverse;
$('jquery-selectors-go-here').reverse().each(function () {
//business as usual goes here
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment