jQuery: How to call function when element shows

前端 未结 7 1611
执念已碎
执念已碎 2021-01-13 11:06

I want to call a function when a div shows (after show).

Does anybody knows how could I do this? I try to use something like that:

$(#someDiv).bind(\         


        
相关标签:
7条回答
  • 2021-01-13 11:46

    try this

    $(#someDiv).bind('show',function(){
        callFunction();
    });
    

    or

    $(#someDiv).on('show',function(){
        callFunction();
    });
    

    function callFunction() { ............ }

    0 讨论(0)
提交回复
热议问题