*/
attr: function( key, value, type ) {
// Check to see if we're setting style values
- return key.constructor != String || value ?
+ return key.constructor != String || value != undefined ?
this.each(function(){
// See if we're setting a hash of styles
if ( value == undefined )
return this.each( n, arguments );
};
});
+
+ jQuery.each( jQuery.macros.filter, function(i,n){
+ jQuery.fn[ n ] = function(num,fn) {
+ return this.filter( ":" + n + "(" + num + ")", fn );
+ };
+ });
jQuery.each( jQuery.macros.attr, function(i,n){
n = n || i;
css: "width,height,top,left,position,float,overflow,color,background".split(","),
+ filter: [ "eq", "lt", "gt", "contains" ],
+
attr: {
/**
* Get the current value of the first matched element.