5
當我點擊#button
時,它仍然在執行'do something'
,即使.wrapper
正在動畫並且.wrapper span
不可見。所以它不遵守規則。怎麼了?jquery:this.not(':animated')&& that.is(':visible')不遵循規則,語法問題?只有幾行代碼
$('#button').click(function(){
if(
$('.wrapper').not(':animated') && $('.wrapper span').is(':visible')
) {
//do something
}
})
'未( ':動畫')'不是檢查,但是一個選擇器。所以如果所有''.wrapper''都是動畫的,它會返回'[]' – glebm 2010-10-25 06:22:29