Side navigation
#5793 closed bug (invalid)
Opened January 13, 2010 11:54AM UTC
Closed June 13, 2010 11:56PM UTC
Jquery IE error caused by UI slider / animate
Reported by: | GetafixIT | Owned by: | |
---|---|---|---|
Priority: | critical | Milestone: | 1.4 |
Component: | unfiled | Version: | 1.3.2 |
Keywords: | Cc: | alex@dobos.co.uk | |
Blocked by: | Blocking: |
Description
Hi,
I am getting a problem with IE6 & IE7 (not tested IE8 yet), when trying to use various jQuery components together. The error that I am getting seems to be coming from the main jQuery library which is why I am posting this here and not on the UI bug tracker.
I am using the UI slider in conjunction with animate and scale functionality. I have no JS errors in Firefox or Chrome but the IEs are falling over in a big way! MS script debugger points to the main jQuery library.
There is an example of the demo here:
http://www.dobos.co.uk/sliderDemo/IT5-My-mobile123.htm
NB: please be descreet with this URL as it is for an enterprise level client & I will have to take the demo down in a few days.
I would really appreciate your help on this one as I was hoping to avoid cross-browser JS errors by using jQuery!
Hi...
Fixed the problem - the IEs require the use of px when defining properties to alter, whilst the other browsers don't.
Also, you have to set the margins individually, rather than at the same time like I would normally do (margin:40px 30px 20px 10px;).
So this doesn't work:
$(this).stop().animate({
height: '200',
width: '300',
margin: '0px 0px 0px 0px'
}, 300);
and this does:
$(this).stop().animate({
height: '200px',
width: '300px',
marginTop: '0px',
marginBottom: '0px',
marginRight: '0px',
marginLeft: '0px'
}, 300);
BUT... when doing it the wrong way (!) the error that IE throws seems to refer to the jQuery javascript rather than any of the jQuery UI JavaScripts.
Gotta take the script down now so the original URL won't work any more.
Thanks anyways!