jquery-backstretch

Using Backstretch for different images for individual pages

亡梦爱人 提交于 2020-01-02 08:39:11
问题 I hope there's someone out there that can help. I am trying to use jQuery Backstretch to apply a different background image for each specific page within Bootstrap/Wordpress. e.g: Home - bg image a About - bg image b News - bg image c and so on... I've managed to use the standard Backstretch script to display a single image for all pages, but I am totally lost (even after searching) on how to apply the the above. My code so far: <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery

backstretch.js duration out of sync with .animate() delay

会有一股神秘感。 提交于 2019-12-25 01:22:54
问题 Preface: I am new to writing my own jQuery code and have had help writing the animateContinously() function below. I'm using backstretch.js to have a full browser viewport/background slideshow and jQuery animate() function to change the color (with the help of the jquery-color.js plugin) of the text that shows on top of the backstretch controlled images, depending on which backstretch image is showing. It works, but the backstretch() duration and animate() delay are out of sync if I set them

Change jQuery image src dynamically

泄露秘密 提交于 2019-12-10 18:25:56
问题 I saw just wondering how it would be possible to change a src every say 5 seconds, I am using $.backstretch("site.com/images/home5.jpg"); Is it possible to swap 'home5.jpg' with other image (say home6.jpg and home7.jpg) like a slideshow? I'm not sure how to change it dynamically 回答1: If you wanted to change it every 5 seconds you'd need to use setInterval() : var loop = 1; setInterval(function() { var imgNumber = loop % 5; // assuming there are 5 images. $.backstretch("site.com/images/home" +