Created
March 5, 2015 04:20
-
-
Save cesardv/421949cd708706395677 to your computer and use it in GitHub Desktop.
FontAwesome Fallback
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> | |
<script> | |
(function($){ | |
var $span = $('<span class="fa" style="display:none"></span>').appendTo('body'); | |
if ($span.css('fontFamily') !== 'FontAwesome' ) { | |
// Fallback Link | |
$('head').append('<link href="/css/font-awesome.min.css" rel="stylesheet">'); | |
} | |
$span.remove(); | |
})(jQuery); | |
/* from http://jsfiddle.net/skibulk/fp1gqnyc/ */ | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment