+ $.fn.data = function(name, value) {
+ return value === undefined ?
+ // set multiple values via object
+ $.isPlainObject(name) ?
+ this.each(function(i, node){
+ $.each(name, function(key, value){ setData(node, key, value) })
+ }) :
+ // get value from first element
+ (0 in this ? getData(this[0], name) : undefined) :
+ // set value on all elements
+ this.each(function(){ setData(this, name, value) })
+ }
+
+ $.fn.removeData = function(names) {
+ if (typeof names == 'string') names = names.split(/\s+/)
+ return this.each(function(){
+ var id = this[exp], store = id && data[id]
+ if (store) $.each(names || store, function(key){
+ delete store[names ? camelize(this) : key]
+ })
+ })
+ }
+
+ // Generate extended `remove` and `empty` functions
+ ;['remove', 'empty'].forEach(function(methodName){
+ var origFn = $.fn[methodName]
+ $.fn[methodName] = function() {
+ var elements = this.find('*')
+ if (methodName === 'remove') elements = elements.add(this)
+ elements.removeData()
+ return origFn.call(this)
+ }
+ })
+})(Zepto)
+
+;(function(){