Callback for jquery plugin Isotope

前端 未结 5 559
执念已碎
执念已碎 2021-02-09 05:48


I\'m using isotope ( http://isotope.metafizzy.co ) with expandable items, and i would like to use ScrollTo so that i can automatically scroll to the newly expanded item..

5条回答
  •  粉色の甜心
    2021-02-09 06:26

    The callback for the Isotope reLayout fires too soon indeed.

    I used bind to detect when the animation ended.

    It works works for both the jquery and css animation engine.

    $("#isotope").bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd", function(){
    
    });
    

    ps: this has to be placed after the regular isotope code of course.

    Greetings, Manuel

提交回复
热议问题