JQuery returns wrong value for IE Compatibility
- by o-logn
Hey ,
I'm using JQuery and there seems to be a problem when I run IE in compatibility mode (and generally any IE less than version 8). I'm trying to use attr("value") for a button control. In IE8, and other browsers, this works fine and the result of this code:
alert($(this).attr("value"));
is simply the value of set in the button attribute (e.g. Home, Settings, Help etc..)
However, when this is run in IE compatibility view, I get the entire HTML as the output value:
<SPAN class=ui-button-text>Home</SPAN>
This causes my checks to fail. Is there a way to return just the Home section across all browsers?
Thanks