diff --git a/OxyGen-slideshow/OxyGen-slideshow.js b/OxyGen-slideshow/OxyGen-slideshow.js index b0b04d1..393fd70 100644 --- a/OxyGen-slideshow/OxyGen-slideshow.js +++ b/OxyGen-slideshow/OxyGen-slideshow.js @@ -10,8 +10,8 @@ pulse{$slideUnique}.on( 'playing', function(isPlaying) { }); pulse{$slideUnique}.on( 'transitionstart', function(e) { var data = e.data, - title = $('#content-title{$slideUnique}'), - caption = $('#content-caption{$slideUnique}'), + title = $('#{$slideUnique}_title'), + caption = $('#{$slideUnique}_caption'), link = $('#content-link{$slideUnique}'); link.attr("href", data.url); if (data.title.length > 1 ) { @@ -37,17 +37,30 @@ function playState{$slideUnique}(playing) { } else { el.html('{{ language.play }}'); } -} -var interval = 1; -setInterval(function(){ - if(interval == 3){ - $('#nav_content').fadeOut(2000); - interval = 1; +}; +$(document).ready(function() { +//The page is "ready" and the document can be manipulated. + if (('ontouchstart' in window) || (navigator.maxTouchPoints > 0) || (navigator.msMaxTouchPoints > 0)){ + //If the device is a touch capable device, then... + $(document).on("touchstart", "a", function() { + //Do something on tap. + }); + } else { + var interval = 1; + setInterval(function(g){ + if(interval == 5){ + $('#nav_content').fadeOut(2000, function(h){ + $('#nav_content').css({"display": "block","visibility": "hidden"}); + interval = 1; + }); + } + interval = interval+1; + },1000); + $(document).bind('mousemove keypress', function(i) { + $('#nav_content').fadeIn(2000, function(j){ + $('#nav_content').css({"visibility": "visible"}); + interval = 1; + }); + }); } - interval = interval+1; -},1000); - -$(document).bind('mousemove keypress', function() { - $('#nav_content').fadeIn(2000); - interval = 1; }); diff --git a/OxyGen-slideshow/plugin.json b/OxyGen-slideshow/plugin.json index fcfd951..290362f 100644 --- a/OxyGen-slideshow/plugin.json +++ b/OxyGen-slideshow/plugin.json @@ -1,6 +1,6 @@ { "name": "OxyGen Slideshow", - "version": "1.1", + "version": "1.1.1", "description": "Embed slideshow with controls in essay and pages.", "author": { "name": "Bjarne Varoystrand", diff --git a/OxyGen-slideshow/plugin.php b/OxyGen-slideshow/plugin.php index 0438494..7a7aef5 100644 --- a/OxyGen-slideshow/plugin.php +++ b/OxyGen-slideshow/plugin.php @@ -9,7 +9,7 @@ function render($attributes) { return <<
- +