Why can't I set attribute "TYPE" of LI element in IE?
        Posted  
        
            by Petr Urban
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Petr Urban
        
        
        
        Published on 2010-05-17T12:41:12Z
        Indexed on 
            2010/05/17
            13:00 UTC
        
        
        Read the original article
        Hit count: 226
        
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?
© Stack Overflow or respective owner