Why can't I set attribute "TYPE" of LI element in IE?
- by Petr Urban
Hello,
I've just come to an unusual beghavior of Internet Explorer IE (v8.0.6001.18904).
When I try to set "type" attribute of any <LI> element, it will result into error.
I used jQuery (v1.32):
$("<li>").attr("type", "test");
The same thing works for DIV. LI element does not seem to have "type" attribute reserved by HTML or XHTML definitions. It also might be jQuery issue.
Solution is simple - just use another attribute name :-)
But is there someone out there who knows WHY does this error occur? Could it happen with another attribute names? Why the error comes with LI element only?