Welcome to WebmasterWorld Guest from 54.166.54.215

Forum Moderators: open

JQuery - Copy Closest Link

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



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]

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



Fixed it.

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

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month