[jQuery] Re: Best practice for image source change

2007-04-10 Thread Oddish
Thanks a lot tobaco! That's much better! Thanks also to Will Kelly! On Apr 5, 1:36 pm, "tobaco" <[EMAIL PROTECTED]> wrote: > you could this also do it this way: > >

[jQuery] Re: Best practice for image source change

2007-04-05 Thread Will Kelly
I wrap each thumbnail with a link: This is the amateurish jQuery code I've conjured up: $("a#tnLink01").click(function() { $("#mainImage").attr({src:"another_large_image.jpg"}); }); I'll need one of these functions for every thumbnail and that seems wrong somehow, so I'd really appreciat

[jQuery] Re: Best practice for image source change

2007-04-05 Thread tobaco
you could this also do it this way: $("a.images").click(function() { var large_img = $(this).attr('href'); $("#mainImage").attr('src', large_img); return false; }); this way it's more accessible for users without javascript On 5 Apr., 12:49, "Oddish" <[EMAIL PROTECTED]> wrote: