Last active
March 25, 2018 13:00
-
-
Save srobbin/1978678 to your computer and use it in GitHub Desktop.
Revisions
-
srobbin revised this gist
Mar 25, 2018 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ // Duration is the amount of time in between slides, // and fade is value that determines how quickly the next image will fade in $.backstretch([ "images/outside.jpg" , "images/garfield-interior.jpg" , "images/cheers.jpg" ], {duration: 3000, fade: 750}); -
srobbin revised this gist
Sep 8, 2012 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ /* * Here is an example of how to use Backstretch as a slideshow. * Just pass in an array of images, and optionally a duration and fade value. */ // Duration is the amount of time in between slides, // and fade is value that determines how quickly the next image will fade in -
srobbin revised this gist
Sep 7, 2012 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,4 +10,3 @@ , "http://dl.dropbox.com/u/515046/www/garfield-interior.jpg" , "http://dl.dropbox.com/u/515046/www/cheers.jpg" ], {duration: 3000, fade: 750}); -
srobbin revised this gist
Sep 7, 2012 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,4 +9,5 @@ "http://dl.dropbox.com/u/515046/www/outside.jpg" , "http://dl.dropbox.com/u/515046/www/garfield-interior.jpg" , "http://dl.dropbox.com/u/515046/www/cheers.jpg" ], {duration: 3000, fade: 750}); -
srobbin revised this gist
Sep 7, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,4 +9,4 @@ "http://dl.dropbox.com/u/515046/www/outside.jpg" , "http://dl.dropbox.com/u/515046/www/garfield-interior.jpg" , "http://dl.dropbox.com/u/515046/www/cheers.jpg" ], {duration: 3000, fade: 750}); -
srobbin revised this gist
Sep 7, 2012 . 1 changed file with 5 additions and 24 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,31 +1,12 @@ /* Here is an example of how to use Backstretch as a slideshow. Just pass in an array of images, and optionally a duration and fade value. */ // Duration is the amount of time in between slides, // and fade is value that determines how quickly the next image will fade in $.backstretch([ "http://dl.dropbox.com/u/515046/www/outside.jpg" , "http://dl.dropbox.com/u/515046/www/garfield-interior.jpg" , "http://dl.dropbox.com/u/515046/www/cheers.jpg" ], {duration: 4000, fade: 750}); -
srobbin created this gist
Mar 5, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,31 @@ /* Backstretch does not support slideshows out of the box (yet) But, it's fairly easy to set one up. Here is an example of how to use Backstretch as a slideshow. */ var images = [ "http://dl.dropbox.com/u/515046/www/outside.jpg" , "http://dl.dropbox.com/u/515046/www/garfield-interior.jpg" , "http://dl.dropbox.com/u/515046/www/cheers.jpg" ]; // A little script for preloading all of the images // It"s not necessary, but generally a good idea $(images).each(function(){ $("<img/>")[0].src = this; }); // The index variable will keep track of which image is currently showing var index = 0; // Call backstretch for the first time, // In this case, I"m settings speed of 500ms for a fadeIn effect between images. $.backstretch(images[index], {speed: 500}); // Set an interval that increments the index and sets the new image // Note: The fadeIn speed set above will be inherited setInterval(function() { index = (index >= images.length - 1) ? 0 : index + 1; $.backstretch(images[index]); }, 5000);