Compatibility issues with Internet Explorer 8 [dup

2019-09-19 17:33发布

问题:

This question already has an answer here:

  • jQuery is adding a strange attribute to nodes 1 answer

I am facing a problem with this site www.airmaster.dk. In IE 8 the java script is not rendering correctly as it suppose to and I cant figure out why it is happening.

It's rendering the elements something like this:

<DIV class=nav-bar jQuery1830605484465614684="10"><A class=opener-subnav href="javascript:void(0);" jQuery1830605484465614684="8">Genveje</A>

as it suppose to render it like this :

<div class="nav-bar">
                    <a href="javascript:void(0);" class="opener-subnav">Genveje</a>

chrome, firefox, IE9 and above

IE 8 and below

IE 8 double header and footer close tags

Jquery http://www.speedyshare.com/pHwuX/jquery.main-1.js

Thanks in advance.

回答1:

This is because HTML5 tages like header and footer does not support on IE8 or below.

You should use 3rdparty library such as html5shiv to render HTML5 tags correctly.



回答2:

IE just show you DOM node properties added by javascript. jQuery1830605484465614684 is just the jQuery UID for inner usage.

ADD:

Your stylesheets not applied. May be its have syntax error or to many selectors.