javascript - JQuery toggle images CSS -
i using jquery change css of images.
it works , changes image css size when clicked. issue when click on next image, previous image stays new css toggle.
is there way when click on next image, previous image goes original css.
i have included jsfiddle example here: http://jsfiddle.net/webdott/hsfpp/
here jquery code:
$('img').click(function() { $(this).toggleclass('thumb fullview') });
you can see each image click stays large.
thanks
check fiddle. solved issue. please check fiddle http://jsfiddle.net/resey/1/
$('img').click(function() { $(this).toggleclass('fullview').siblings().removeclass('fullview'); });
Comments
Post a Comment