Opened 1 year ago
Last modified 6 months ago
We're using the "Slider" mechanism from the interface plugin in our application which works fine with jQuery 1.1.2, but throws an error with jQuery 1.1.3 in Internet Explorer (at least in IE7). Are there any plans to update interface to support jQuery 1.1.3?
Sorry, I forgot to select the right component. This should be switched to the "interface" component.
I see the same behavior. Opening up the script debugger in IE shows the problem in jquery.js in method 'find':
return this.pushStack( /[+>] [+>]/.test( t )
I'm not sure which part of that line is causing the problem but the error in IE simply says:
"Object doesn't support this property or method"
This is how I fixed it:
in interface's idrag.js remove the line
var dhe = o.handle ? jQuery(this).find(o.handle) : jQuery(this);
and replace it with
if (jQuery.browser.msie) { var dhe=$(o.handle); }
else { var dhe = o.handle ? jQuery(this).find(o.handle) : jQuery(this); }
I'm thinking this is a jQuery issue, not an Interface issue.
The problem, it seems, relates to this:
/[+>] [+>]/.test( t )
when t is a DOM Element, this evaluates to true in Firefox, but false in IE. So only in IE does it evaluate t.indexOf which is the method that is not supported.
Will continue to explore...
Nevermind, .find() should only have a string as the parameter. o.handle should be a string, not an element.
I noticed that the solution above works for single handle sliders but not for double handles so I rewrote the function:
find: function(t) { var data = jQuery.map(this, function(a){ return jQuery.find(t,a); }); if(jQuery.browser.msie){ return this.pushStack( jQuery.map( this, function(a){ return jQuery.find(t,a); }), t ); }else{ return this.pushStack( /[^+>] [^+>]/.test( t ) || t.indexOf("..") > -1 ? jQuery.unique( data ) : data ); } },
I added an if-statement to check if the browser is IE, and if it is, it implements the code from the find: function in jQuery 1.1.2. This solution isn't fully tested, so please give feedback if it works or not.
Thanks
Sorry forgot to mention that the above functions with 1.1.4
I replace the find function with the above code and it stopped IE 7 from crashing, but once I move the right handle and then switch to the left, the control wont let me use the right handle again.
Using jquery.js-1.2.1 and interface.js 1.2.
Interface is no longer supported; consider switching to jQuery UI.