aboutsummaryrefslogtreecommitdiffstats
path: root/src/jqLite.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/jqLite.js')
-rw-r--r--src/jqLite.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/jqLite.js b/src/jqLite.js
index 4959a2ed..4c68cdef 100644
--- a/src/jqLite.js
+++ b/src/jqLite.js
@@ -204,11 +204,16 @@ function JQLiteUnbind(element, type, fn) {
}
}
-function JQLiteRemoveData(element) {
+function JQLiteRemoveData(element, name) {
var expandoId = element[jqName],
expandoStore = jqCache[expandoId];
if (expandoStore) {
+ if (name) {
+ delete jqCache[expandoId].data[name];
+ return;
+ }
+
if (expandoStore.handle) {
expandoStore.events.$destroy && expandoStore.handle({}, '$destroy');
JQLiteUnbind(element);