[jQuery] Re: Find all links that go to .jpg images

2007-11-01 Thread sccr410
This worked like a charm: script type=text/javascript $(document).ready(function() { $(a[href$='.jpg']).addClass('thickbox'); }); /script -- View this message in context:

[jQuery] Re: Find all links that go to .jpg images

2007-10-31 Thread Flesler
Try this: $('a[pathname$=.jpg]') On 31 oct, 20:41, sccr410 [EMAIL PROTECTED] wrote: I'm trying to use jQuery to add the thickbox functionality to every link which links to a jpg file. How can you do this? -- View this message in

[jQuery] Re: Find all links that go to .jpg images

2007-10-31 Thread alexanmtz
The thickbox doesnt work this way, they enable the thickbox throught the class name equal to thickbox. I never tried, but you can add this class dinamically just with the links that have a .jpg format. like this: $(a[href*='.jpg']).addClass(thinckbox); or .attr(class,thickbox); I hope it

[jQuery] Re: Find all links that go to .jpg images

2007-10-31 Thread alexanmtz
The thickbox doesnt work this way, they enable the thickbox throught the class name equal to thickbox. I never tried, but you can add this class dinamically just with the links that have a .jpg format. like this: $(a[href*='.jpg']).addClass(thinckbox); or .attr(class,thickbox); I hope it