Test case details

Preparation Code

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <input type="text" id="theInput" value="foo"></input> <script>   var theInput = $('#theInput');   theInput.prop('someAttr', 'theValue').data('someData', 'theValue'); </script>

Test cases

Test #1

theInput.prop('someAttr');

Test #2

theInput.prop('someAttr', 'newValue');

Test #3

theInput.data('someData');

Test #4

theInput.data('someData', 'newValue');

Test #5

theInput.data().someData;

Test #6

theInput.data().someData = 'newValue';

Test #7

var test = $.data(theInput[0],'someData');

Test #8

$.data(theInput[0], 'someData','test1');

Test #9

theInput[0].someAttr = "test1";

Test #10

var test = theInput[0].someAttr;