On Oct 6, 2006, at 7:12 AM, Jörn Zaefferer wrote:
> Try this:
> $(".jShow a img").hide().attr({"src": $(this).attr("href").replace(/
> \.(.+)$/, "-large.$1"), "title":
> $(this).attr("title")});
>
> Tested with "javascript.txt" as href value, works fine.
>
> -- Jörn
I'm a little confused about this. Doesn't "src": $(this).attr
("href")... mean that the img element's own href attribute is being
used for its src element? Shouldn't it be "src": $(this).parent().attr
("href")... so that it uses the a element's href? Or, am I totally
missing something?
Karl
___________________
Karl Swedberg
www.englishrules.com
www.learningjquery.com
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/