jquery: this.not (':animated') && that.is (':visible') not following the rules, syntax problem? only few lines of code

when i click on #button, it's stilling doing the 'do something', even though .wrapper is animating and .wrapper span is not visible. so it's not following the rules. what's wrong?

$('#button').click(function(){
  if(
    $('.wrapper').not(':animated') && $('.wrapper span').is(':visible')
  ) {
    //do something
  }
})
5
задан android.nick 25 October 2010 в 06:20
поделиться