Kcko
1/22/2017 - 9:40 AM

jQuery - reverse each

jQuery - reverse each

$(function(){
	var reversedSet = $("li").get().reverse();
	//Use get() to return an array of elements, and then reverse it
 
	$(reversedSet).each(function(){
		//Now we can plug our reversed set right into the each function. Could it be easier?
	});
});