Closed
Description
From the OP:
Right--that's fine. What's confusing is if the documentation implies that .data("name", null) will have the same effect as .removeData("name"). It will not:
.data("name", null) will set the value to null (future calls to .data("name") will yield null)
.removeData("name") will remove the data item entirely (future calls to .data("name") will yield undefined)
From @rwldrn:
To avoid a re-query of the data- attribute, set the name to a value of null (e.g. .data("name", null)) rather than using .removeData().
Metadata
Metadata
Assignees
Labels
No labels