X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY ANGULAR XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

jQuery Misc removeData() Method

jQuery Misc Methods jQuery Misc Methods

Example

Remove previously attached data from a <div> element:

$("#btn2").click(function(){
  $("div").removeData("greeting");
  alert("Greeting is: " + $("div").data("greeting"));
});

Try it yourself »

Definition and Usage

The removeData() method removes data previously set with the data() method.


Syntax

$(selector).removeData(name)

Parameter Description
name Optional. Specifies the name of data to remove.
If no name is specified, this method will remove all stored data from the selected elements


jQuery Misc Methods jQuery Misc Methods


Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates FREE Website Templates Free HTML Templates

SHARE THIS PAGE

facebook