Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

get element attribute jquery

function getAttributes ( $node ) {
    var attrs = {};
    $.each( $node[0].attributes, function ( index, attribute ) {
        attrs[attribute.name] = attribute.value;
    } );

    return attrs;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #element #attribute #jquery
ADD COMMENT
Topic
Name
8+9 =