Fix IE8 icon font display issues
This jquery snippet is written to combat IE8 weirdness with the combo of embeded fonts and pseudo elements, as are often used for icon fonts.
Modified version of this idea: http://stackoverflow.com/questions/9809351/ie8-css-font-face-fonts-only-working-for-before-content-on-over-and-sometimes/10557782#10557782
$(document).ready(function($){
$('head').append('<style id="iconfontfix" type="text/css">:before,:after{content:none !important}</style>')
setTimeout(function(){
$('#iconfontfix').remove()
}, 0);
});
Written by Nate Steiner
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Jquery
Authors
Did you know?
JavaScript on a page runs with the privileges of that origin. One altered library, tag manager, or snippet can read inputs, change what people see, and call your APIs as the user.
Security insights from Cside
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#