How to detect DIV's dimension changed?

后端 未结 25 2376
抹茶落季
抹茶落季 2020-11-22 06:14

I\'ve the following sample html, there is a DIV which has 100% width. It contains some elements. While performing windows re-sizing, the inner elements may be re-positioned,

25条回答
  •  孤街浪徒
    2020-11-22 06:49

    My jQuery plugin enables the "resize" event on all elements not just the window.

    https://github.com/dustinpoissant/ResizeTriggering

    $("#myElement") .resizeTriggering().on("resize", function(e){
      // Code to handle resize
    }); 
    

提交回复
热议问题