O'Reilly logo

Ext JS 4 Web Application Development Cookbook by Stuart Ashworth, Andrew Duncan

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

Selecting DOM elements

When creating interactive and responsive web applications it's vital to be able to access DOM elements for manipulation and processing. Ext JS provides multiple methods of retrieving references to those DOM elements, which we will explore in this recipe.

Ext JS wraps basic DOM elements up in a class called Ext.Element , which is what we generally deal with when retrieving DOM elements and manipulating them. It provides a large number of helpful methods to make life easy for us.

How to do it...

Imagine an HTML page, with the Ext JS 4 library loaded into it, containing the following HTML fragment:

<h1 id=-book-title->Ext JS 4 Cookbook</h1> <h2>Authors</h2> <ul id="authors"> <li>Stuart Ashworth</li> <li>Andrew Duncan</li> </ul> ...

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