PDA

View Full Version : Newbie question: select all elements in one div



Brian_himself
18 Jun 2007, 5:30 AM
Hi all,

I'm new to Javascript and just tryin out those awesome extjs-features.
For my purpose, i want to select all the <td> elements from a div.
That is, i have a photo gallery and i want each large photo (which are shown as thumbnails in a table on the site) to be shown in a Messagebox or a dialogbox, (think both will work). While that large image is shown in the box, the photgallery shall fade out, i.e. ill lower the transpareny of the td-elements in that table. That photogallery resides in a div.
So i need to call all the td elements in that certain div, but only these. Think that questions quite trivial, but i couldnt find help anywhere so far.

para
18 Jun 2007, 6:38 AM
I believe that if you lower the transparency of the parent DIV, it will affect everything contained within it. Try it out.

neror
18 Jun 2007, 7:24 AM
Another option is to use an element mask over the div (as long as you don't need to be able to click on anything in that div while it's masked). It's as easy as Ext.get('div-id').mask() and then Ext.get('div-id').unmask() to unmask it.

efege
18 Jun 2007, 7:24 AM
For my purpose, i want to select all the <td> elements from a div.

Regardless of what you intend to do, one answer to your question would be:


Ext.select('#yourDivId td')

para
9 Oct 2007, 4:49 AM
No.

That's not a question. That's asking someone to do the code for you.

Look at the Image Organizer (http://extjs.com/deploy/ext-2.0-alpha1/examples/organizer/organizer.html) example.

BernardChhun
7 Nov 2007, 4:54 AM
This isn't a forum meant for building apps for other people I believe. Most of us are here to build web apps & get help doing it.

you should probably hire someone to do it for you.