Hi,
Got a bit of a brain fart here... I would like to highlight a set of
DIV's (ideally by defined class name as it suits our development
process). I have the following functioning code:
However it only ever highlights the first testlabel div, not them all,
which is is expected as ID's should be unique I guess. How would I
make it so the highlighting which takes place can actually highlight
them all by defined class name so all DIV's assigned with the class
"testlabel" are actually highlighted?
Thanks
Code
-------
<br><a href="" onMouseOver="new Effect.Highlight('testlabel',
{startcolor:'#ff99ff', endcolor:'#999999'})">Edit Labels (by ID)</a>
<br>
<h1> By ID </h1>
<br>
<div id="testlabel">foo</div>
<br>
<div id="testlabel" >foo</div>
<br>
<div id="testlabel">foo</div>
<br>
<div id="testlabel">foo</div>
<br>
<div id="testlabel">foo</div>
<br>
<h1>By Class</h1>
<br>
<div class="testlabel">foo</div>
<br>
<div class="testlabel" >foo</div>
<br>
<div class="testlabel">foo</div>
<br>
<div class="testlabel">foo</div>
<br>
<div class="testlabel">foo</div>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on
Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---