Last active
August 29, 2015 14:01
-
-
Save rohozhnikoff/6b760fc3fc727f5b2bea to your computer and use it in GitHub Desktop.
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
$('<script>', {src: '//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.6.0/underscore-min.js'}).appendTo('head'); | |
$(function(){ | |
var arr = []; | |
$('*').each(function(i, el){ | |
var classe = $(el).attr('class'); | |
if(classe && classe.length) { | |
arr.push(classe.split(' ')); | |
} | |
}); | |
arr = _(arr).sortBy(); | |
arr = _(arr).flatten(); | |
arr = _(arr).uniq(); | |
console.log(arr); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment