Tuesday, April 10, 2012

jquery resize on div element

jquery has the resize()-event, but it just work with window.



jQuery(window).resize(function(){/*What ever*/});


This works fine!
But when i want to add the event to a div element it doesnt work.



E.g.



jQuery('div').resize(function()/*What ever*/{});


I want to start an callback when the size of a div-element has changed. I DONT want to start a resizeable-event - just a event to check if the size of a div-element has changed.



Is there any solution to do this ?





No comments:

Post a Comment