I just know this is a dumb question with a simple answer, but here goes...
I have  something like:
<a href="#div1" class="trigger">Link a</a>
<a href="#div2" class="trigger">Link a</a>

and
<div id="div1"></div>
<div id="div2"></div>

I need to match the link to it's div, but can't figure out the selector. Non
working test js is:
$(document).ready(function() {
               $("a.trigger").each(function(i) {
                   targetDiv = $($(this).href);
                   targetDiv.style.background = "red";
               });
           });

So how do I match the link to it's div?
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to