I am using Bootstrap 3 glyphics on a website. It works great in browsers, but not on some devices, as it appears as a question mark.
I found this fix: Some of Bootstrap3 glyphics do not display correctly on the phonegap android webview website , which fixes the issue on devices, but now the glyphicon doesnβt work in Firefox, (I am redefining Bootstrap boot settings to use actual, unscreened glyphs in my CSS. ) I was wondering if there is a way to write some jquery using browser detection for Firefox to remove the override in my CSS file and bring it back to Bootstrap CSS.
I found this jQuery browser detection plugin: https://github.com/gabceb/jquery-browser-plugin
Code:
JS
if ( $.browser.mozilla ) {
$('a#calendar span').removeClass('glyphicon-calendar');
$('a#calendar span').css({'glyphicon-calendar:before': 'content: "\1f4c5"'});
}
CSS to override Bootstrap
.glyphicon-calendar:before {
content: "\d83d\dcc5";
}
Boot CSS
.glyphicon-calendar:before {
content: "\1f4c5";
}
Thank you for your help.
source
share