Im trying to use this code to toggle between a play and pause button but it doesn\'t seem to be working. How can I get it toggle between the 2 images when the are clicked >
$(document).ready(function(){
var src1 = "http://tympanus.net/PausePlay/images/play.png";
var src2 = "http://maraa.in/wp-content/uploads/2011/09/pause-in-times-of-conflict.png";
$("#infoToggler").click(function(){
var src = $('#infoToggler img').attr('src');
if(src == src1){$('#infoToggler img').attr('src',src2);}
else{$('#infoToggler img').attr('src',src1);}
});
})
it's working, i had checked..