I have simple button:
<button type="button" id="somebutton" value="start">blah</button>
in jQuery, on the bind(‘click, function(){….
I have this:
$(this).attr("value")
of course what this does is gets the value of an attribute, which in this particular case is: “start”. OK, this works in firefox, I get correct value of “start”. However in IE 7 the value I get is “somebutton”.
why?
I have come across that before. I don’t know why that happens for
<button>. It could be a bug in jQuery, or it could be a bug in IE, or it could be a combination of both.In the end, I opted to go with a standard
<input type="button"/>to get around the issue.