Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Console profiling test of looping through an array in jQuery to check a property
/// This...
if(featuredItems.filter(':animated').length) {
return false;
}
/// ... is twice as fast as this...
featuredItems.each(function() {
if($(this).is(':animated')) {
return false;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.