wandoledzep/bxslider — Issue #38: Fade animations trigger an error in IE 8
Author: Gipetto
Created: 2011-10-18 16:59:23+00:00
State: open

Maybe even in 7, but I don't have an IE7 test install at the moment.

Using the fade transition will cause an error of (paraphrased) "this object does not support this method" which points down in to an area of jQuery that handles animation. No amount of DOM or CSS changes would work.

I made the fade calls a bit more explicit (ie: to use `fadeIn` & `fadeOut` instead of `fadeTo`). This change is working for me in all browsers.

```diff

--- jquery.bxSlider.js
+++ (clipboard)
@@ -670,10 +670,10 @@
top: 0,
left: 0,
zIndex: 98
-	});
+	});
$outerWrapper = $parent.parent().parent();
-	$children.not(':eq('+currentSlide+')').fadeTo(0, 0);
-	$children.eq(currentSlide).css('zIndex', 99);
+	$children.eq(currentSlide).css('zIndex', 99)
+	.siblings().fadeOut(0);
}
// if captions = true setup a div placeholder
if(options.captions && options.captionsSelector == null){
@@ -919,9 +919,9 @@
*/
function setChildrenFade(){
// fade out any other child besides the current
-	$children.not(':eq('+currentSlide+')').fadeTo(options.speed, 0).css('zIndex', 98);
+	$children.not(':eq('+currentSlide+')').fadeOut(options.speed, 0).css('zIndex', 98);
// fade in the current slide
-	$children.eq(currentSlide).css('zIndex', 99).fadeTo(options.speed, 1, function(){
+	$children.eq(currentSlide).css('zIndex', 99).fadeIn(options.speed, function(){
isWorking = false;
// ie fade fix
if(jQuery.browser.msie){
```