O'Reilly logo

Learning Ext JS 4 by Armando Gonzalez, Crysfel Villa

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Working with the DOM

The Ext JS provides an easy way to deal with the DOM. We can create nodes, change styles, add listeners, and create beautiful animations, among other things without worrying about the browsers implementations. The Ext JS provides us with a cross-browser compatibility API that will make our lives easy.

The responsible class for dealing with the DOM nodes is the Ext.Element class. This class is a wrapper for the native nodes and provides us with many methods and utilities to manipulate the nodes.

Getting elements

We can use the get method from the Ext.Element class to get a node by its ID and then manipulate the node using the Element wrapper.

<!DOCTYPE html> <html> <head> <title>The DOM</title> <!-- Importing the Ext JS library ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required