JSFiddle - React, Tailwind, and code Playground

HTML

<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/themes/ui-lightness/jquery-ui.css">
<div id=test>div</div>

JavaScript

// set an arbitrary property on the DOM element

var div = document.getElementById('test');

div.someCustomProperty = "some custom value";



// access the property using .prop()
alert( $('div').prop('someCustomProperty') );




// accessing the property using .attr() fails
alert( $('div').attr('someCustomProperty') );