I believe that the JavaScript resize event applies only to frames or windows, and not to the DIV.
eg. see this page :
The onResize parity handler is used to execute the specified code whenever the user or script resizes the window or frame. This allows you to query the size and position of window elements, dynamically reset SRC properties, etc.
So, if you want to determine when a window is resized, in jQuery you should probably use $(window).resize(function() { });
Edit: if you want to see the size of the DIV, it depends on your intention. If you resize using JavaScript, you can implement a method to perform resizing and have this handle that invokes any other resize code.
Otherwise, if you just watch the DIV resize when someone resizes the window, won't it just work to attach the resize listener to the window and then check if the DIV has been resized (e.g. keep the old value width / height and check them when resizing)?
Finally, you can use the watch’s width / height properties, although I don’t know if this is a full browser (I think it can only be Mozilla). I found this jQuery plugin that looks like it can do the same thing (albeit with some minor changes).
user7094 Oct 23 '08 at 8:59 2008-10-23 08:59
source share