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

Popular posts from this blog

mod rewrite - Using "?" when rewriting the URL -

.htaccess: Transfer name to index.php if not directory public -

Admob integration with pygame in android -