Skip to content

Instantly share code, notes, and snippets.

@hrstt
Created September 5, 2011 02:42
Show Gist options
  • Save hrstt/1193939 to your computer and use it in GitHub Desktop.
Save hrstt/1193939 to your computer and use it in GitHub Desktop.
jQuery: 複数オブジェクトの逆順並べ
$(function(){
// same class name jQuery object
$('div.some_class');
// these reverse indices jQuery object
// Once get indexed objects to array,
// Then use Array.reverse() to descending order.
// At last, convert array object to jQuery object.
$($('div.some_class').get().reverse());
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment