Sha256: 2c2a49d3c76ee59a43ec16de2498362b58b01d919bd128e4bb0ca93d162639b4
Contents?: true
Size: 1.17 KB
Versions: 24
Compression:
Stored size: 1.17 KB
Contents
//>>excludeStart("exclude", pragmas.exclude); define([ "shoestring", "dom/css/getStyle", "dom/css/setStyle" ], function(){ //>>excludeEnd("exclude");// TODO: This code should be consistent with attr(). /** * Get the compute style property of the first element or set the value of a style property * on all elements in the set. * * @method _setStyle * @param {string} property The property being used to style the element. * @param {string|undefined} value The css value for the style property. * @return {string|shoestring} * @this shoestring */ shoestring.fn.css = function( property, value ){ if( !this[0] ){ return; } if( typeof property === "object" ) { return this.each(function() { for( var key in property ) { if( property.hasOwnProperty( key ) ) { shoestring._setStyle( this, key, property[key] ); } } }); } else { // assignment else retrieve first if( value !== undefined ){ return this.each(function(){ shoestring._setStyle( this, property, value ); }); } return shoestring._getStyle( this[0], property ); } }; //>>excludeStart("exclude", pragmas.exclude); }); //>>excludeEnd("exclude");
Version data entries
24 entries across 24 versions & 1 rubygems