Is it possible to add an onmouseover attribute to an input element where type equals image?
I have created the following code but it does not add the attribute.
<script language="javascript" type="text/javascript">
$(document).ready(function() {
$("input").each(function(i) {
if (this.src.indexOf('/images/icons/thumbs.png') != -1) {
$(this).attr({ onmouseover: "images/icons/thumbsover.png" });
$(this).attr({ onmouseout: "images/icons/thumbsout.png" });
}
});
});
</script>