Skip to content

Instantly share code, notes, and snippets.

@jspinella
Last active August 29, 2015 14:25
Show Gist options
  • Save jspinella/cfb82b81e9e8a00aeed8 to your computer and use it in GitHub Desktop.
Save jspinella/cfb82b81e9e8a00aeed8 to your computer and use it in GitHub Desktop.
Uses jQuery to fetch Font Awesome font-icon unicode values (in alphabetical order) from Font Awesome's website. Paste code into your browser's Js Developer Console while on Font Awesome's Cheatsheet page!
// ParseFA-Unicode
// FontAwesome Unicode Values
var awesomeOutput= "";
$(".col-md-4.col-sm-6.col-lg-3").children(".muted").each(function (i, element) {
var unicode = $(element).text(); // grabs text within HTML element
unicode = unicode.substring(1,8); // selects only the unicode values (not their enclosing brackets)
awesomeOutput += ('\n' + unicode); // puts each unicode value on its own line
});
console.log(awesomeOutput);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment