jQuery disable enable click event with fade

后端 未结 2 566
-上瘾入骨i
-上瘾入骨i 2021-01-27 06:10

how can i disable click event before fadein and enable it after fadeout?

my js code:

$(\'a\').click(function(){
    // disable click
    $(\'div\').fadeO         


        
2条回答
  •  旧时难觅i
    2021-01-27 06:25

    Add as the first line of your click callback:

    if ($('div').is(':animated')) return;
    

提交回复
热议问题