Originally reported by @vizmo here: jquery/jquery#1852
Re: http://api.jquery.com/data/
The incorrect bullet item:
undefined is not recognised as a data value. Calls such as .data( "name", undefined ) will return the corresponding data for "name", and is therefore the same as .data( "name" ).
The correction:
undefined is not recognised as a data value. Calls such as .data( "name", undefined ) will return the jQuery instance object that it was called on, which allows for method chaining. (Or something similar)
The correct behavior is supported by tests in the data test suite. https://github.com/jquery/jquery/blob/master/test/unit/data.js#L232
Originally reported by @vizmo here: jquery/jquery#1852
Re: http://api.jquery.com/data/
The incorrect bullet item:
The correction:
undefinedis not recognised as a data value. Calls such as.data( "name", undefined )will return the jQuery instance object that it was called on, which allows for method chaining. (Or something similar)The correct behavior is supported by tests in the data test suite. https://github.com/jquery/jquery/blob/master/test/unit/data.js#L232