spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / javascript / column45


A DOM-Based Sliding Puzzle (3)

Developer News
HP to Microsoft: Thanks for Nothing
iPhone Remains Left Out as Android Scores Flash
The Year of Living the OpenSocial

The Puzzle's DOM Tree

One of the DOM's advantages is that you can isolate the document's nodes you want to deal with via the DOM tree. You just put the relevant nodes under a single common father and access the subtree rooted at this father node. You don't need to bother with everything else in the document that is outside this subtree. We enclosed our South Park Sliding Puzzle's elements in a DIV element that we assigned the divNode id. Our code deals only with this node and its child nodes. The structure of the subtree is quite simple: one father node and 11 child nodes. As explained in the previous page, nine of these nodes are IMG nodes and the other two are BR nodes. Here is a sketch of the DOM tree:

http://www.internet.com

Produced by Yehuda Shiran and Tomer Shiran

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

webref The latest from WebReference.com Browse >
Administering RBAC in PHP 5 CMS Framework · xref: Automatic Cross Referencing Script · Book Review: Content Rich
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Gateway Launches New Core i7-powered FX-Series Gaming PCs · Review: Lenovo ThinkPad SL300 · EBay, Alternative Site Holiday Resources for Sellers


Created: August 2, 1999
Revised: August 2, 1999

URL: http://www.webreference.com/js/column45/analyze.html