Pages

Welcome !!!

Hi,
Welcome to the Tech-Info world where you will be provided with the latest Tech-Updates and much more !!!

Just have a look !!!

Saturday, April 30, 2011

The JAVA things...!!!!


2. Manipulating the DOM

Creating interactive interfaces on the web requires interacting with the Document Object Model. It's okay if you don't have the innermost knowledge of the DOM because YUI does a lot of this work for you in one of its core libraries.
The YUI DOM class offers convenient methods to access DOM elements. This library is a singleton and doesn't require instantiation. Simply put, just include the prerequisite yahoo.js and the library, dom.js, and call the methods directly.
elements for manipulation. You also can get and set styles, the XY coordinate of an element, manipulate class names, and even get the Viewport size.
The DOM library is probably most often used to retrieve page elements by either ID or class for manipulation. You also can shorten your code by assigning this singleton object to a variable at the beginning of a function or class. You can do this with almost all of the YUI utility classes.
$D = YAHOO.util.Dom;
This allows you to call any method of the DOM class using a much shorter line of code throughout your function or class.
$D.get('myid');

No comments:

Post a Comment