Grow your CSS skills. Land your dream job.

Icon fonts not working in IE8

  • # February 18, 2013 at 11:29 am

    That bit of script is jQuery, and you don’t have jQuery loading on your page. Grab the source link for the Google-hosted jQuery library from [here](https://developers.google.com/speed/libraries/devguide?#jquery) and include it **before** that script tag.

    # February 18, 2013 at 11:50 am

    can’t thank you enough.

    # February 19, 2013 at 6:31 am

    Josh…just when I thought I was sorted I get this message:

    Error: ‘$.browser.msie’ is null or not an object

    My code is as follows:

    Any ideas? This approach definitely works as when I ignore that warning the page works fine everytime.

    # February 19, 2013 at 7:08 am

    The browser property is removed in 1.9 – http://api.jquery.com/jQuery.browser/ , what version jQuery do you use?

    # February 19, 2013 at 8:01 am

    I am using 1.9.1 and testing the site on IETester to get it to work on iE8

    # February 19, 2013 at 12:51 pm

    Ah, I forgot about the removal of $.browser. Loading jQuery 1.8.x instead would be the simplest solution.

    Edited to add: Testing anything JS-related in IETester is generally a bad idea, in my experience. JavaScript in IETester doesn’t always work the same as in IE itself, unfortunately. For this you’re probably okay, but in the future you may want to look into using Browserstack or setting up a testing VM instead. I use https://github.com/xdissent/ievms/ personally.

    # February 19, 2013 at 2:50 pm

    Thanks Josh. You’re right about IE Tester as all sorts of weirdness started happening today when I changed the $.browser reference. The icons started to swop positions, absolutely bizarre.

    Am I on the right lines with the following:

    if ($.support.msie && 8 == parseInt($.browser.version)) { $(function() { var $ss = $(‘#base-css’); $ss[0].href = $ss[0].href; }); }

    or should I change ($.browser.version) to ($support.version).

    Thanks.

Viewing 7 posts - 16 through 22 (of 22 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".