Skip to main content
Home / Code Snippets / jQuery Code Snippets / Select Element Only if Children are Not Animated

Select Element Only if Children are Not Animated

var myChildrenBehave =  $(".element").filter(function() {
  var filtered = $(this).children().not(":animated");
  return filtered;
 });

This selects the element only if its children behave (not being animated). Very helpful on a drop down menu (on hover or click)

icon-link icon-logo-star icon-search icon-star