Support » Plugin: Background Slider Master » Crossfading

  • Resolved curlybracket

    (@veganist)


    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!

    https://wordpress.org/plugins/background-slider-master/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author WebSPI

    (@devcon1)

    Hello curlybracket,

    Thanks for your contribution. I’ve added that feature to the free version along with some other refinements and addons. I’ve credited your ID and this thread in the JS comment.

    By the way, for those who might get confused, the edit has to be made on “background-slider-master-public.js”

    However, we really appreciate your support and please let us know if there is anything else we should consider improving.

    Thank you!

    Thank you! 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Crossfading’ is closed to new replies.