JQuery Question
-
Hello! So I’m using JQuery to cycle through images on my home screen, but they fade to white instead of from one image to the next. When I’ve found tutorials showing how to fade from one to the next, they’re frequently working with html files, but seeing as wordpress is mostly .php, I really don’t know how to utilize those examples…. Is there any way I can edit the code below to make it have the action I wish?
Here is the site:
http://www.tcinteriors.orgThe code:
jQuery(document).ready(function($) { var initialBg = $('body.home').css("http://belynchdesign.com/tcinteriors/wp-content/uploads/2014/04/beachbed.jpg"); // added var firstTime = true; var arr = [initialBg, "url(http://belynchdesign.com/tcinteriors/wp-content/uploads/2014/04/beachy2.jpg)", "url(http://belynchdesign.com/tcinteriors/wp-content/uploads/2014/04/bluetan3.jpg)"]; // changed (function recurse(counter) { var bgImage = arr[counter]; if (firstTime == false) { $("body.home").fadeOut("slow", function(){ $('body.home').css('background-image', bgImage); // fixed }); $("body.home").fadeIn("slow"); } else { firstTime = false; } delete arr[counter]; arr.push(bgImage); setTimeout(function() { recurse(counter + 1); }, 1000); })(0); });
-
http://tcinteriors.org/wp-content/plugins/cyclone-slider-2/templates/dark/script.js?ver=2.8.2
http://tcinteriors.org/wp-content/plugins/cyclone-slider-2/templates/thumbnails/script.js?ver=2.8.2
http://tcinteriors.org/wp-content/plugins/cyclone-slider-2/js/client.js?ver=2.8.2′></script>
these are the file check those and match your code then change it …
I’m sorry, but I’m a little confused about what to do with all of this…
- The topic ‘JQuery Question’ is closed to new replies.