PDA

View Full Version : div resize event



mes-x
19 Aug 2010, 7:07 AM
Hello!

does anybody know, how to fire a resize event on a html div?
i tried:

Ext.get("IdOfMyDiv").on("resize", function(){...})
... but it's not working...

The reason, why i need this is because my homepage is based on standard html with ExtJs support for several things. In this case the content of a div is changing dynamically when resizing the browserwindow, or when pressing a button, or when hiding some information, ....)

I know the event for browser-resizing but not the event for a div-container resizing....


thank you for your help and best regards!!

Condor
19 Aug 2010, 7:15 AM
Individual elements don't fire resize events, only the window does.

Ext.EventManager.on(window, 'resize', function(){
//...
});

ps. You seem to be looking for the FitToParent plugin (see User Extensions forum).