From 0c60b81640bedfee2a981a3c6bfa42afa15b0a08 Mon Sep 17 00:00:00 2001 From: wi77 Date: Fri, 1 Feb 2013 19:09:08 +0100 Subject: [PATCH 1/7] changed structure to be more independent from dom-layout --- index.html | 22 ++++++- jquery.fullscreenslides.js | 130 +++++++++++++++++++++++++++---------- 2 files changed, 113 insertions(+), 39 deletions(-) diff --git a/index.html b/index.html index 7391872..7f9be79 100644 --- a/index.html +++ b/index.html @@ -8,10 +8,22 @@ @@ -126,6 +138,10 @@

Example (click image to view)

+

Example (click on separate start button)

+ +

+

Pictures take from Wikimedia Commons Picture of the Year 2007.

Usage

diff --git a/jquery.fullscreenslides.js b/jquery.fullscreenslides.js index c73df5f..2adddfb 100644 --- a/jquery.fullscreenslides.js +++ b/jquery.fullscreenslides.js @@ -9,25 +9,36 @@ ; /* * It assumes that your images are wrapped in links like this: - * - * - * + * + * * - * - * + * * - * - * + * * * + * You are free to place any images or text inside the links or hide them when you only want one start button + * * You would then call it like this: * * * * + + + + + + +
+ +

jQuery HTML5 Fullscreen Slideshow

+ +

This jQuery plugin lets you create fullscreen galleries where the slides are shown on the entire screen using the fullscreen APIs provided by Firefox 10+ and Chrome 15+ (and possibly Safari 5.1+).

+

In all other browsers it falls back to displaying the slideshow in the entire viewport.

+ +

Example

+ +
+ + + + + +
+ +
+
+ Configure Slideshow + + + + + +
+
+ +

Pictures take from Wikimedia Commons Picture of the Year 2007.

+ +

Usage

+ +

+      
+      

License

+ +

© Copyright 2012 by Eike Send

+

The code is licensed under the MIT and the GPLv2 Licenses, just like jQuery.

+ +

Footnotes

+ +

Learn more about the fullscreen API:

+ + + +
+ + + + + + + + + Fork me on GitHub + + + From 0c1c1e8320d17d919ad5406c45c041aa8a88137c Mon Sep 17 00:00:00 2001 From: wi77 Date: Thu, 7 Feb 2013 15:21:10 +0100 Subject: [PATCH 7/7] removed debug output --- jquery.fullscreenslides.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/jquery.fullscreenslides.js b/jquery.fullscreenslides.js index dccb432..c2051ed 100644 --- a/jquery.fullscreenslides.js +++ b/jquery.fullscreenslides.js @@ -180,7 +180,7 @@ // check if preload has finished if (!$(newSlide).data("loading")) { var oldSlide = $container.data("currentSlide"); - // if it is not loaded yet then initialize the dom object and load it, only to avoid raceconditions with the preloader + // if it is not loaded yet then initialize the dom object and load it, only to avoid race conditions with the preloader if (!("$img" in newSlide)) { $container.trigger("startLoading"); $(newSlide).data("requestShow",true); @@ -200,13 +200,13 @@ currentID = currentSlide && currentSlide.id || 0, options = $container.data("options"); // sanitary check for race condition which can occour if slideshow is timer triggered in the user app - if (!slides) return; + if (!slides) return false; if (event.type == "nextSlide") { nextID = (currentID + 1) % slides.length; - // no loop + // no repeat if ((nextID < currentID) && options.noLoop && !preLoad) { - $container.trigger("close"); - return; + $(this).trigger("close"); + return false; } } else { nextID = (currentID - 1 + slides.length) % slides.length; @@ -285,6 +285,7 @@ $container .removeData("currentSlide slides width height originalScrollTop hiddenElements") .hide(); + return false; }); // Set options at runtime. This is usefull when you want to set options on user request -> after init, but before start