The removeData() is an inbuilt method in jQuery which is used to remove those data which are previously set with the data() method. Syntax:
Here “selector” is the selected element whose previously set data get removed. Parameter: It accepts an optional parameter “args” which specifies the name of the data to remove for the selected element. Return Value : It returns the selected element with removed data.
jQuery code to show the working of removeData() method:
In the below code, the data get removed by removeData() method set by the data() method.
Please Login to comment...