Home | ExtJs Website | ExtJs Official Examples | ExtJs Forum | Other ExtJs Links

Scale Elements

Ext has some great effects (FX) which can be found in the Ext.FX class in the API, this page demonstrates how you can scale elements using different event handlers.

Worth noting...

I added a multiple event handler in this script, this demonstrates how to have multiple events assigned to an element, on this occasion I am detecting mouseover/mouseout events to make a nice scaling div.

getWidth() has a boolean (true/false) attribute which when used gives the actual values of the element without any padding etc - very useful for accuracy in our input boxes.

Also introduced is basic value handling from input, with rudimentary error checking, we also demonstrated basic resetting of elements to values from page load. A gotcha also is to spot the el.dom.value update on the input tag rather than a straight el.value update.

Pausing between effects is introduced too as are some css changes using Ext.Element.

We used...


Try it out!

I am a div with an ID of 1 and I will scale for your viewing pleasure.

 

I am Div #2.

Please resize me
at your leisure!


The Javascript Code