Commit fc305432 authored by Vadim Makeev's avatar Vadim Makeev

Merge pull request #175 from shower/tg/174-first-last

Fix Home/End navigation (#174)
parents 9fc1d0c6 47e4c112
...@@ -493,7 +493,7 @@ window.shower = window.shower || (function(window, document, undefined) { ...@@ -493,7 +493,7 @@ window.shower = window.shower || (function(window, document, undefined) {
shower.first = function(callback) { shower.first = function(callback) {
var slide = shower.slideList[shower.getCurrentSlideNumber()]; var slide = shower.slideList[shower.getCurrentSlideNumber()];
slide.timing && slide.stopTimer(); slide && slide.timing && slide.stopTimer();
shower.go(0); shower.go(0);
if (typeof(callback) === 'function') { if (typeof(callback) === 'function') {
...@@ -508,7 +508,7 @@ window.shower = window.shower || (function(window, document, undefined) { ...@@ -508,7 +508,7 @@ window.shower = window.shower || (function(window, document, undefined) {
shower.last = function(callback) { shower.last = function(callback) {
var slide = shower.slideList[shower.getCurrentSlideNumber()]; var slide = shower.slideList[shower.getCurrentSlideNumber()];
slide.timing && slide.stopTimer(); slide && slide.timing && slide.stopTimer();
shower.go(shower.slideList.length - 1); shower.go(shower.slideList.length - 1);
if (typeof(callback) === 'function') { if (typeof(callback) === 'function') {
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment