1
0
mirror of https://github.com/webslides/WebSlides.git synced 2025-08-19 11:21:20 +02:00

fix: jump from any slide to any other slide

This commit is contained in:
Felipe Valverde
2017-01-29 15:53:23 -05:00
parent c09832e191
commit 2127a04363
2 changed files with 9 additions and 4 deletions

View File

@@ -226,7 +226,10 @@ jQuery(document).ready(function($){
$currentSlide = $slides.eq(moveToSlide);
$currentSlide.show().addClass(ID.current);
jQuery('.slide:lt('+(slideNumber-1)+')').each(function() {var $this = jQuery(this); $this.siblings('.slide').last().after($this); });
jQuery('.slide:lt('+$currentSlide.index()+')').each(function() {
var $this = jQuery(this);
$this.siblings('.slide').last().after($this);
});
slidePointer.current = slideNumber;
// update counter
@@ -368,4 +371,3 @@ jQuery(document).ready(function($){
$('body').toggleClass('baseline').css('height', $(document).height());
}
});

View File

@@ -226,7 +226,10 @@ jQuery(document).ready(function($){
$currentSlide = $slides.eq(moveToSlide);
$currentSlide.show().addClass(ID.current);
jQuery('.slide:lt('+(slideNumber-1)+')').each(function() {var $this = jQuery(this); $this.siblings('.slide').last().after($this); });
jQuery('.slide:lt('+$currentSlide.index()+')').each(function() {
var $this = jQuery(this);
$this.siblings('.slide').last().after($this);
});
slidePointer.current = slideNumber;
// update counter
@@ -411,4 +414,4 @@ jQuery(document).ready(function($){
if(e.which == 13) {
$('body').toggleClass('baseline').css('height', $(document).height());
}
});
});