]> source.dussan.org Git - jquery.git/commitdiff
Follow-up for .selector property removal
authorOleg <markelog@gmail.com>
Fri, 2 Nov 2012 00:36:48 +0000 (04:36 +0400)
committerDave Methvin <dave.methvin@gmail.com>
Fri, 2 Nov 2012 01:31:55 +0000 (21:31 -0400)
src/core.js
src/traversing.js

index ae514e85598c405a4fc557a61a1c3e1863d89b04..1b3f106ae514aa2da56a1ae9db9c2db941fd2874 100644 (file)
@@ -36,7 +36,7 @@ var
        // Used for detecting and trimming whitespace
        core_rnotwhite = /\S/,
        core_rspace = /\s+/,
-       
+
        // List of deleted data cache ids, so we can reuse them
        core_deletedIds = [],
 
@@ -231,8 +231,7 @@ jQuery.fn = jQuery.prototype = {
        },
 
        slice: function() {
-               return this.pushStack( core_slice.apply( this, arguments ),
-                       "slice", core_slice.call(arguments).join(",") );
+               return this.pushStack( core_slice.apply( this, arguments ) );
        },
 
        first: function() {
@@ -493,7 +492,7 @@ jQuery.extend({
                }
 
                if ( typeof data === "string" ) {
-                       
+
                        // Make sure leading/trailing whitespace is removed (IE can't handle it)
                        data = jQuery.trim( data );
 
index b50f230ce28ac6589bf9c0eaa156d813ad3a08b2..75a564f5c0e4a044448d422dfaef791d8be980fc 100644 (file)
@@ -31,9 +31,8 @@ jQuery.fn.extend({
                }
 
                // Needed because $( selector, context ) becomes $( context ).find( selector )
-               ret = this.pushStack( jQuery.unique( ret ) );
                ret.selector = ( this.selector ? this.selector + " " : "" ) + selector;
-               return ret;
+               return this.pushStack( jQuery.unique( ret ) );
        },
 
        has: function( target ) {
@@ -90,9 +89,7 @@ jQuery.fn.extend({
                        }
                }
 
-               ret = ret.length > 1 ? jQuery.unique( ret ) : ret;
-
-               return this.pushStack( ret );
+               return this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret );
        },
 
        // Determine the position of an element within