return this.length;
},
- toArray: slice,
+ toArray: function(){
+ return slice.call( this, 0 );
+ },
// Get the Nth element in the matched element set OR
// Get the whole matched element set as a clean array
// Namespaced event handlers
var namespaces = type.split(".");
type = namespaces.shift();
- handler.type = namespaces.slice().sort().join(".");
+ handler.type = namespaces.slice(0).sort().join(".");
// Get the current list of functions bound to this event
var handlers = events[ type ],
var namespaces = type.split(".");
type = namespaces.shift();
var all = !namespaces.length,
- namespace = new RegExp("(^|\\.)" + namespaces.slice().sort().join(".*\\.") + "(\\.|$)"),
+ namespace = new RegExp("(^|\\.)" + namespaces.slice(0).sort().join(".*\\.") + "(\\.|$)"),
special = this.special[ type ] || {};
if ( events[ type ] ) {
// Cache this now, all = true means, any handler
all = !namespaces.length && !event.exclusive;
- var namespace = new RegExp("(^|\\.)" + namespaces.slice().sort().join(".*\\.") + "(\\.|$)");
+ var namespace = new RegExp("(^|\\.)" + namespaces.slice(0).sort().join(".*\\.") + "(\\.|$)");
handlers = ( jQuery.data(this, "events") || {} )[ event.type ];
}
var makeArray = function(array, results) {
- array = Array.prototype.slice.call( array );
+ array = Array.prototype.slice.call( array, 0 );
if ( results ) {
results.push.apply( results, array );
// Perform a simple check to determine if the browser is capable of
// converting a NodeList to an array using builtin methods.
try {
- Array.prototype.slice.call( document.documentElement.childNodes );
+ Array.prototype.slice.call( document.documentElement.childNodes, 0 );
// Provide a fallback method if it does not work
} catch(e){