jQuery विविध निकालेंडेटा () विधि
उदाहरण
<div> तत्व से पहले से संलग्न डेटा निकालें:
$("#btn2").click(function(){
$("div").removeData("greeting");
alert("Greeting is: " + $("div").data("greeting"));
});
परिभाषा और उपयोग
रिमूवडाटा () विधि डेटा () विधि के साथ पहले से सेट किए गए डेटा को हटा देती है।
वाक्य - विन्यास
$(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 |