Hi I am using the following script to change a button image to toggle between play and stop:
<input type="image" src="../../Content/images/play.png" name="btn" style="width:22; height:22;" />
$(document).ready(function () {
$('#btn').bind("click", function () {
if ($(this).attr("scr") == "../../Content/images/play.png")
$(this).attr("scr", "../../Content/images/puase.png");
else
$(this).attr("scr", "../../Content/images/play.png");
});
});
It does not work, would appreciate your suggestions.
try this:
also add
id="btn"to :