{"id":7621113,"date":"2016-07-31T20:43:46","date_gmt":"2016-07-31T20:43:46","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/crossfading\/"},"modified":"2016-09-01T17:20:07","modified_gmt":"2016-09-01T17:20:07","slug":"crossfading","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/crossfading\/","title":{"rendered":"Crossfading"},"content":{"rendered":"<p>Hi,<\/p>\n<p>thanks for this great plugin!<\/p>\n<p>I&#8217;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&#8217;ve replaced:<\/p>\n<pre><code>function BackgroundLoad($this,imageWidth,imageHeight,imgSrc){\n      $this.fadeOut(&quot;fast&quot;,function(){\n         $this.attr(&quot;src&quot;, &quot;&quot;).attr(&quot;src&quot;, imgSrc); \/\/change image source\n         FullScreenBackground($this,imageWidth,imageHeight); \/\/scale background image\n         $preloader.fadeOut(&quot;fast&quot;,function(){$this.fadeIn(&quot;slow&quot;);});<\/code><\/pre>\n<p>by <\/p>\n<pre><code>function BackgroundLoad($this,imageWidth,imageHeight,imgSrc){\n      var $clone = $this.clone().addClass(&#039;clone&#039;).prependTo(&#039;#bsm-bg&#039;);\n      $this.fadeOut(&quot;slow&quot;,function(){\n         $this.attr(&quot;src&quot;, &quot;&quot;).attr(&quot;src&quot;, imgSrc); \/\/change image source\n         FullScreenBackground($this,imageWidth,imageHeight); \/\/scale background image\n         $preloader.fadeOut(&quot;slow&quot;,function(){\n            $this.fadeIn(&quot;slow&quot;, function() {\n               $clone.remove();\n            });\n         });<\/code><\/pre>\n<p>And I added the following CSS:<\/p>\n<pre><code>.clone {\n  position: absolute;\n  top: 0;\n  left: 0;\n}<\/code><\/pre>\n<p>Hope it helps maybe to propose such an option to users later?<\/p>\n<p>Cheers!<\/p>\n<p>https:\/\/wordpress.org\/plugins\/background-slider-master\/<\/p>\n","protected":false},"template":"","class_list":["post-7621113","topic","type-topic","status-publish","hentry","topic-tag-crossfade"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/7621113","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/7621113\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=7621113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}