Crossfading
-
Hi,
thanks for this great plugin!
I’ve modified it a bit in order to crossfade images and wanted to share this with you. In public/class-background-slider-master-public.php I’ve replaced:
function BackgroundLoad($this,imageWidth,imageHeight,imgSrc){ $this.fadeOut("fast",function(){ $this.attr("src", "").attr("src", imgSrc); //change image source FullScreenBackground($this,imageWidth,imageHeight); //scale background image $preloader.fadeOut("fast",function(){$this.fadeIn("slow");});
by
function BackgroundLoad($this,imageWidth,imageHeight,imgSrc){ var $clone = $this.clone().addClass('clone').prependTo('#bsm-bg'); $this.fadeOut("slow",function(){ $this.attr("src", "").attr("src", imgSrc); //change image source FullScreenBackground($this,imageWidth,imageHeight); //scale background image $preloader.fadeOut("slow",function(){ $this.fadeIn("slow", function() { $clone.remove(); }); });
And I added the following CSS:
.clone { position: absolute; top: 0; left: 0; }
Hope it helps maybe to propose such an option to users later?
Cheers!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Crossfading’ is closed to new replies.