i am not able to change image on clicking image in jquery pls see this
$("#signin").click(function (event) {
event.preventDefault();
alert("show data");
$("#signin").Attr('src', 'images/icon.png');
});
You need to change
.Attr
to
.attr
.Attr is not a function in jQuery, it's case sensitive.
Documentation : http://api.jquery.com/attr/
Note: You could use this.src there is no need to use jQuery to change the source of the image
$("#signin").click(function (event) {
event.preventDefault();
alert("show data");
this.src= 'images/icon.png';
});
You have mis-spelled the function attr(). The Attr should be attr, javascript is case sensitive.
$("#signin").click(function (event) {
event.preventDefault();
alert("show data");
$("#signin").attr('src', 'images/icon.png');
});