Last active
August 29, 2015 14:25
-
-
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!
This file contains 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
// 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