JSFiddle - React, Tailwind, and code Playground

HTML

<ul id="log"></ul>

CSS

#log li { font-family: monospace; }

JavaScript

var $log = jQuery("#log"),
    $test = jQuery("<div><a></a></div>");

$test
    // Grr @ http://bugs.jquery.com/ticket/11483
    .add( ":nth-child(1)", $test )
    .each(function() {
        var attrs = this.attributes,
            i = attrs.length;
    
        // oldIE will see Sizzle properties at the end of attrs
        // Modern browsers will see nothing
        while ( i-- && attrs[i].specified ) {
            $log.append( "<li>" + attrs[i].name + "=\"" + attrs[i].value + "\"" );
        }
    });