I have some images with class name \".mute_btn\" and when i click on them, my images source is changing :
$(\'.mute_btn\').toggle(function () { var c
The code that I use:
$('#example').click(function() { isClicked=$(this).data('clicked'); if (isClicked) {isClicked=false;} else {isClicked=true;} $(this).data('clicked',isClicked); if(isClicked) { ...do stuff... } else { ...do stuff... } });