Last Updated: February 25, 2016
·
1.108K
· nsteiner

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);

});