From 2e615e8c464e0abfcc7e79375d546bd4703abb24 Mon Sep 17 00:00:00 2001 From: "luxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f" Date: Sun, 27 Jun 2010 18:31:54 +0000 Subject: updated slideshow with better controls, option for non-playing permalinks --- media/js/slideshow.js | 47 +++++++++++++++++++++++++++++----------------- media/js/slideshow.pack.js | 2 +- 2 files changed, 31 insertions(+), 18 deletions(-) (limited to 'media/js') diff --git a/media/js/slideshow.js b/media/js/slideshow.js index 05f00a7..227efdd 100644 --- a/media/js/slideshow.js +++ b/media/js/slideshow.js @@ -73,6 +73,23 @@ function remove_exif() { // $(document).ready(function(){ + + + //Add navigation + $('#breadcrumbs').after('
'); + //activate pause button + $('#play').toggle(function() { + $('#slides').cycle('pause'); + $(this).html('▶'); + $(this).attr('title','Play slideshow'); + }, function() { + $('#slides').cycle('resume', true); + $(this).html('▐▐'); + $(this).attr('title','Pause slideshow'); + }); + + + //set up click events for map button $('.map-link').click( function() { if ($("#exif-container").is(":visible")){ @@ -105,28 +122,36 @@ $(document).ready(function(){ $('#slides').append('
'); $('.slidenav').css("display","none"); + var is_permalink = false; //find out if we should display a specific slide var index = 0, hash = window.location.hash; if (hash) { index = /\d+/.exec(hash)[0]; index = (parseInt(index) || 1) - 1; // slides are zero-based + //if this is a permalink, then don't autoplay: + is_permalink = true; } // initialize the cycle slideshow $('#slides .bigimg').wrapAll('
').parents('#slides').append('