X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fjquery%2Fjquery.js;h=44c1eec2296fc8044b816c23b4be8f46e6889a3e;hb=367abc373be76ae24b5aed2c5e49fbc308ecebcc;hp=846c8154124ce63b510eb2736af3122ff5025263;hpb=26580d2675918bb689d55293e734e68671b4dfc6;p=jquery.git diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index 846c815..44c1eec 100644 --- a/src/jquery/jquery.js +++ b/src/jquery/jquery.js @@ -314,7 +314,7 @@ jQuery.fn = jQuery.prototype = { // Look for the case where we're accessing a style value jQuery[ type || "attr" ]( this[0], key ); }, - + /** * Access a style property on the first matched element. * This method makes it easy to retreive a style property value @@ -557,6 +557,12 @@ jQuery.fn = jQuery.prototype = { return jQuery.find(t,a); }), arguments ); }, + + clone: function(deep) { + return this.pushStack( jQuery.map( this, function(a){ + return a.cloneNode( deep != undefined ? deep : true ); + }), arguments ); + }, /** * Removes all elements from the set of matched elements that do not @@ -847,7 +853,7 @@ jQuery.extend({ }); jQuery.each( jQuery.macros.css, function(i,n){ - jQuery.fn[ i ] = function(h) { + jQuery.fn[ n ] = function(h) { return h == undefined ? ( this.length ? jQuery.css( this[0], n ) : null ) : this.css( n, h ); @@ -1023,7 +1029,8 @@ jQuery.extend({ // Form elements enabled: "!a.disabled", disabled: "a.disabled", - checked: "a.checked" + checked: "a.checked", + selected: "a.selected" }, ".": "jQuery.className.has(a,m[2])", "@": { @@ -2364,6 +2371,11 @@ jQuery.macros = { }, each: { + + removeAttr: function( key ) { + this.removeAttribute( key ); + }, + /** * Displays each of the set of matched elements if they are hidden. *