Sha256: b1bf68bbb05a8ad8d95a6ed0766e8185c0fd7be0399d153b33367a04e005c5e4
Contents?: true
Size: 929 Bytes
Versions: 24
Compression:
Stored size: 929 Bytes
Contents
//>>excludeStart("exclude", pragmas.exclude); define([ "shoestring" ], function(){ //>>excludeEnd("exclude"); /** * Get the value of the first element of the set or set the value of all the elements in the set. * * @param {string} name The attribute name. * @param {string} value The new value for the attribute. * @return {shoestring|string|undefined} * @this {shoestring} */ shoestring.fn.attr = function( name, value ){ var nameStr = typeof( name ) === "string"; if( value !== undefined || !nameStr ){ return this.each(function(){ if( nameStr ){ this.setAttribute( name, value ); } else { for( var i in name ){ if( name.hasOwnProperty( i ) ){ this.setAttribute( i, name[ i ] ); } } } }); } else { return this[ 0 ] ? this[ 0 ].getAttribute( name ) : undefined; } }; //>>excludeStart("exclude", pragmas.exclude); }); //>>excludeEnd("exclude");
Version data entries
24 entries across 24 versions & 1 rubygems