Welcome to WebmasterWorld Guest from 54.234.63.187

Forum Moderators: open

Message Too Old, No Replies

JQuery - Copy Closest Link

     

rwilson

9:17 pm on Jan 9, 2013 (gmt 0)

5+ Year Member



I'm trying to duplicate a link in the message but I can't seem to get the syntax right it seems to select the first file no matter what instead of the one the box appears under.

I want to "find closest to this"

Line 21:
$(this).next(".largeFile-confirm").attr('href',$('.largeFile').closest('a').attr('href'));

Any help would be appreciated!

[edited by: rwilson at 9:51 pm (utc) on Jan 9, 2013]

rwilson

9:49 pm on Jan 9, 2013 (gmt 0)

5+ Year Member



Fixed it.

$(this).next(".largeFile-confirm").attr('href',$(this).closest('a').attr('href'));
 

Featured Threads

Hot Threads This Week

Hot Threads This Month