Skip to content

Instantly share code, notes, and snippets.

@salami-art
Created July 2, 2015 16:45
Show Gist options
  • Save salami-art/efe3f77a1196c09e85be to your computer and use it in GitHub Desktop.
Save salami-art/efe3f77a1196c09e85be to your computer and use it in GitHub Desktop.
//Application That lists all the attributes of the elements inside html text in a textarea
var elements = $('<div>'+$('textarea').val()+'</div>').find('*');
elements.each(function() {
var el = this;
var style = "";
console.log(el);
$.each(el.attributes, function() {
console.log(this.name);
});
// el.attr('style', style);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment