You'll have to build up the selector as a string....  when you call
"setTimeout", that function is run out of the context of being within
that .each statement

so you'll have to do something like (and there's many ways of doing
this, i'll just show quick and easy), and yeah, the <a>'s will have to
have IDs on them

 $(document).ready(function(){
         $('#menulinks a').hover(function(){
                 setTimeout('$("#' + this.id + '").stop().animate({
                                 top : "40px",
                                 paddingTop : "40px"
                         });', 1000);
         });

});




On Apr 28, 10:21 pm, Warfang <warfang...@gmail.com> wrote:
> Here's my code:
>
> $(document).ready(function(){
>         $('#menulinks a').hover(function(){
>                 setTimeout(function(){
>                         $(this).stop().animate({
>                                 top : '40px',
>                                 paddingTop : '40px'
>                         });
>                 }, 1000);
>         });
>
> });
>
> Before I added a timeout, (this) sufficed. With the timeout set, (this) did
> not select the hovered link. I tried another selector and it worked fine.
> How can I specify (this) for this situation?
> --
> View this message in 
> context:http://www.nabble.com/Selector-help-needed-tp23289341s27240p23289341....
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to