javascript - How to fire event on general DOM object resize with jquery -
there event on window resize.
$(window).resize(function() { ... });
but if want fire event on type if dom objects, like:
$('div#mydiv').resize(function() { ... ));
but above seemed not work. possible , convenient? or other way?
this plugin offers ability create resize events based on element:
a cross-browser, event-based, element resize detection.
in short, implementation not utilize internal timer observe size changes (as implementations found do). uses scroll events on browsers, , onresize event on ie10 , below.
the method used not detects javascript generated resize changes changes made css pseudo classes e.g. :hover, css animations, etc.
https://github.com/sdecima/javascript-detect-element-resize
javascript jquery
No comments:
Post a Comment