This is a discussion on "HOW??? - Loop through <div> elements on page" within the JavaScript Forum section. This forum, and the thread "HOW??? - Loop through <div> elements on page are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
HOW??? - Loop through <div> elements on page
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
On one of my pages I used javascript to run through each checkbox element on the page and based on the value attribute it would disable or enable it.
Sort of like this :
What javascript code do I use to loop through the <div>'s? I only want to hide the <div>'s that have their id attribute set to a specific set of letter's...how can I do that? Edited at 3:24 p.m....Reason - Problem Solved! I did some googling, then some testing, and arrived at the following code, which takes care of my issue, so here it is for everyone else too!
Last edited by Daniel; Aug 22nd, 2007 at 21:59. Reason: Solved problem before anyone posted a reply... |
|
|
|
#2
|
||||
|
||||
|
Re: HOW??? - Loop through <div> elements on page
Woo go you!!
Thread closed.
Last Blog Entry: Assassin's Creed (Nov 22nd, 2007)
|
![]() |
| Tags |
| loop through divs |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Do a while loop once? | Jack Franklin | PHP Forum | 2 | Feb 15th, 2008 11:07 |
| The Loop (Again) | Blake121 | Free Web Site Critique | 16 | Sep 7th, 2007 13:57 |
| The Loop V2 | Blake121 | Free Web Site Critique | 8 | May 15th, 2007 09:37 |
| The Loop | Blake121 | Free Web Site Critique | 5 | May 1st, 2007 14:25 |
| Loop??? | tazek0 | Classic ASP | 0 | Jan 27th, 2006 07:38 |