Skip to main content

Bug Tracker

Side navigation

Ticket #2771: core.js.patch


File core.js.patch, 0.4 KB (added by ericsk, May 02, 2008 07:29AM UTC)

the patch file of core.js

--- core.js.orig	2008-05-02 15:14:06.000000000 +0800
+++ core.js	2008-05-02 15:14:11.000000000 +0800
@@ -144,6 +144,11 @@
 	index: function( elem ) {
 		var ret = -1;
 
+		// if the elem argument is a jQuery object, get the element
+		if (elem instanceof jQuery) {
+			elem = elem.get(0);
+		}
+
 		// Locate the position of the desired element
 		this.each(function(i){
 			if ( this == elem )

Download in other formats:

Original Format