jQuery - Disable Click until all chained animations are complete

后端 未结 6 1077
无人共我
无人共我 2020-12-05 00:27

Question

The solution below is intended to slide down the groupDiv displaying div1 and enough space for

6条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-05 01:01

    You can easily disable your links while animation is running

    $('a').click(function () {
        if ($(':animated').length) {
            return false;
        }
    });
    

    You can of course replace the $('a') selector to match only some of the links.

提交回复
热议问题