When resize() in JQuery, trigger fires multiple times

前端 未结 2 1857
独厮守ぢ
独厮守ぢ 2021-01-17 03:38

I use Paul Irish Smartresize but when I resize the window the function inside resize() fires multiple times causing my accordion not to work properly. Does anyone have any i

2条回答
  •  甜味超标
    2021-01-17 03:56

    Here's a great piece of code that handles this for you :

    http://benalman.com/projects/jquery-throttle-debounce-plugin/

    Also see:

    http://benalman.com/projects/jquery-dotimeout-plugin/

提交回复
热议问题