|
Safari document.getElementByClassName problem: msg#00130lang.ruby.rails.spinoffs
Hi, I am having a problem under safari with the above mentioned method. In my example document I have something like the following: <div id="label_2" class="lab15">Q1</div> <div id="label_6" class="lab15">Q1</div> <div id="label_10" class="lab15">Q1</div> <div id="label_14" class="lab15">Q1</div> I am trying to select a bunch of elements with the same class name as such: this.labels=document.getElementsByClassName(this.element.className); for (i=0;i<this.labels.length;i++) { Element.addClassName(this.labels[i],"selected_label"); } I have verified that i tries to select with the correct class, but it never returns more than 1 element. Under firefox and family it works fine, selecting all 4. Has anyone seen this kind of behavior before? Is there a work around or fix I should know about? Thanks Pelle -- https://wideword.net + Encrypted document sharing https://stakeitout.com + Stake out your own micro ventures http://stakeventures.com + Bootstrapping blog http://neubia.com + Geek blog http://SoapBX.com + Get on the box and shout _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@xxxxxxxxxxxxxxxx http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Extended $ function called $$: 00130, Michael Schuerig |
|---|---|
| Next by Date: | BlindDown recommendations?: 00130, Jim Meier |
| Previous by Thread: | Extended $ function called $$i: 00130, Sunny |
| Next by Thread: | BlindDown recommendations?: 00130, Jim Meier |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |