0
|
1 //>>excludeStart("exclude", pragmas.exclude);
|
|
2 define([ "shoestring" ], function(){
|
|
3 //>>excludeEnd("exclude");
|
|
4
|
|
5 /**
|
|
6 * Remove data associated with `name` or all the data, for each element in the current set.
|
|
7 *
|
|
8 * @param {string} name The data attribute name.
|
|
9 * @return shoestring
|
|
10 * @this shoestring
|
|
11 */
|
|
12 shoestring.fn.removeData = function( name ){
|
|
13 return this.each(function(){
|
|
14 if( name !== undefined && this.shoestringData ){
|
|
15 this.shoestringData[ name ] = undefined;
|
|
16 delete this.shoestringData[ name ];
|
|
17 } else {
|
|
18 this[ 0 ].shoestringData = {};
|
|
19 }
|
|
20 });
|
|
21 };
|
|
22
|
|
23 //>>excludeStart("exclude", pragmas.exclude);
|
|
24 });
|
|
25 //>>excludeEnd("exclude");
|