119
rated 0 times
[
125]
[
6]
/ answers: 1 / hits: 17343
/ 15 Years ago, mon, may 25, 2009, 12:00:00
I have this method that changes an larger image source on click.
I need to add a 'current' class on the selected. I have no problem adding this class,but I need it to remove the class on the other, previous, selected item.
This is the code I'm using at the moment:
$(document).ready(function() {
$(ul.timgs li a).click(function(e) {
e.preventDefault();
var path = $(this).attr(href);
$(div.tour-image img).attr({src: path});
});
});
Thanks :-)
More From » jquery