Question

I'm doing that fun task of browser testing in IE8 > and naturally html5 isn't playing ball I installed html5shiv to get the css/html to render the elements pretty well, but then it falls over with the javascript side of things...

IE8 isn't applying jQuery effects to html5 elements e.g. nav, header etc... IE9+ is absolutely fine, so wonder because of the lack of html5 support in ie8 it's causing issues, even with html5shiv installed.... Does anyone know a workaround for this?

e.g.

$(document).ready(function () {
  $('nav li,#mini-menu li').hoverIntent(
function (e) {
etc etc etc

Thanks for your time.

Was it helpful?

Solution

It is difficult to pinpoint the cause of this without having a clearer picture of how the HTML5 shiv and jQuery files are being included in the document so this is a really a shot in the dark:

First of all, check if your HTML5 shiv is included into the document before any of your jQuery scripts that you're using to control HTML elements. If the HTML5 shiv is included after, then those HTML5 elements will most likely not be recognised.

Another thing you might want to try doing is to add a class or an ID to the new HTML5 element - for e.g. <nav id="menu"> so that you reference it as $('nav#menu') or simply as $('#menu') in jQuery.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top