Skip to content

Instantly share code, notes, and snippets.

@merin83
Created October 9, 2016 18:24
Show Gist options
  • Select an option

  • Save merin83/6c459428349811b839f3e59d2b860d6c to your computer and use it in GitHub Desktop.

Select an option

Save merin83/6c459428349811b839f3e59d2b860d6c to your computer and use it in GitHub Desktop.
var all = [];
var main = [];
jQuery('.glyph div').each(function(index, div) {
var name = jQuery('div.pbs').find('.mls');
var className = jQuery(name).text();
all.push(className);
});
main = all[0].split(" ");
main.forEach((item) => {
if(item.length) {
var myname = item.replace('icon-','');
console.log("array(\'name\' => \'"+ myname +"\', \'className\' => \'"+item+"\'),");
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment