I know I can do this:
$(window).resize(function() {funkyfunc();});
This will run funkyfunc() on a window resize.
My problem is that I would like to resize a control once another one has been resized.
This doesn’t work — Is there something I am missing or is this simply not possible?
$('#myDiv').parent().resize(function() {funkyfunc();});
The
resizeevent is only called onwindowfor resizes to the browser window, it does not exist on individual elements. What would be resizing them, other than your code? If that is the case, then you could get your code to trigger the resize event by calling.trigger('resize')or somesuch on the element you resize.