Started

Selectors

Utilities

Animation

AJAX

CSS

Event

Manipulation

Cookie

String

Attributes

Data

Storage

Miscellaneous

$data.remove

Remove data from element.
$data.remove( element, name )
  1. element [object]
    The target element.
  2. name [string]
    The name of value.

Notes

This function will can remove data stored data from element.

Example

HTML code
<div id="box" data-city="New York">This is a box</div>
<div id="message"></div>
<button onclick="start_data_get()">Get data from box</button>
<button onclick="start_data_set()">Store data to box</button>
<button onclick="start_data_remove()">Remove data from box</button>
CSS code
#box {
	width: 200px;
	height: 60px;
	font-size: 12px;
	background: #5599bb;
	padding: 10px;
}
JavaScript code
function start_data_get()
{
	$html($("message"), "city: " + $data.get($("box"), "city"));
}
function start_data_set()
{
	$data.set($("box"), "city", "Canton");
}
function start_data_remove()
{
	$data.remove($("box"), "city");
}
Demonstration
This is a box