From here Are empty HTML5 data attributes valid?
They said that data attribute can be property
So I use this to test, this expected result is true / false, but I only got undefined, how to get the correct result using jquery?
<input type='checkbox' onclick='testDataProp(this)' data-tf>
<input type='checkbox' onclick='testDataProp(this)'>
function testDataProp(clickedBox)
{
var trueFalse=$(clickedBox).prop('data-tf');
alert(trueFalse);
}