homepage Welcome to WebmasterWorld Guest from 54.167.179.48
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
JQuery - Copy Closest Link
rwilson



 
Msg#: 4534770 posted 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]

 

rwilson



 
Msg#: 4534770 posted 9:49 pm on Jan 9, 2013 (gmt 0)

Fixed it.

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved