$(document).ready(function() {
$("a.trigger").click(function(){
$(this.hash).css({background: "red" })
// right here the chain can keep on chaining....
and no local or (GLOBAL) variables!
});
});
On 2/15/07, Klaus Hartl <[EMAIL PROTECTED]> wrote:
> Tim Baxter schrieb:
> > But that's not what I need. I need to match up the div to the link. I'm
> > going to be manipulating it in several ways, not always onclick, but the
> > relationship between the two is the important part. Actually, the whole
> > red thing is just for testing.
> >
> > So far, I haven't been able to get $(this.hash) to do anything for me.
>
> You just need to put the pieces together now, try:
>
> $(function() {
> $("a.trigger").each(function() {
> targetDiv = $(this.hash);
> targetDiv.css({background: "red"});
> });
> });
>
>
> -- Klaus
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>
--
Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/