JSFiddle - React, Tailwind, and code Playground

by Timmy Willison

HTML

<ol>
    <li value="1">test</li>
    <li value="value2">test2</li>
</ol>

JavaScript

$('li').each(function() {
    console.log( 'attr: ', $(this).attr('value') );
    console.log( 'prop: ', $(this).prop('value') );
    console.log( 'raw: ', this.value );
    console.log( 'getAttribute: ', this.getAttribute('value') );
});