Skip to content

Instantly share code, notes, and snippets.

@jspinella
Last active August 29, 2015 14:25
Show Gist options
  • Save jspinella/2b7b27f7bb3605300e4a to your computer and use it in GitHub Desktop.
Save jspinella/2b7b27f7bb3605300e4a to your computer and use it in GitHub Desktop.
Uses jQuery to fetch Font Awesome font-icon CSS class 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-Class
// FontAwesome Class Names
var awesomeOutput= "";
$(".col-md-4.col-sm-6.col-lg-3").each(function (i, element) {
var className = $(element).text().split("\n")[2].trim(); // takes all text items in element (the FA icon, class name, and unicode value), says "hey I just want [2], the class name,", and trims the extra space
awesomeOutput += ('\n' + className); // puts each class name 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