jQuery Misc removeData() Method
Example
From the
Remove previously attached data from an element:
$("#btn2").click(function(){
$("div").removeData("greeting");
alert("Greeting is: " + $("div").data("greeting"));
});
Try it »
Definition and Usage
The removeData() method removes data previously set by the data() method.
Syntax
$(
selector
).removeData(
name
)
| Parameters | Description |
|---|---|
| name | Optional. Specifies the name of the data to be removed. |
| If no name is specified, this method will remove all stored data from the selected elements. |
jQuery Miscellaneous Methods