How to detect DIV's dimension changed?

后端 未结 25 2375
抹茶落季
抹茶落季 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:52

    using Bharat Patil answer simply return false inside the your bind callback to prevent maximum stack error see example below:

    $('#test_div').bind('resize', function(){
       console.log('resized');
       return false;
    });
    

提交回复
热议问题