use first fragment's data-autoslide value when there is no current fragment
This commit is contained in:
parent
65a90cc75d
commit
1da1ff0d6d
|
@ -3682,9 +3682,13 @@
|
|||
|
||||
if( currentSlide ) {
|
||||
|
||||
var currentFragment = currentSlide.querySelector( '.current-fragment' );
|
||||
var fragment = currentSlide.querySelector( '.current-fragment' );
|
||||
|
||||
var fragmentAutoSlide = currentFragment ? currentFragment.getAttribute( 'data-autoslide' ) : null;
|
||||
// When the slide first appears there is no "current" fragment so
|
||||
// we look for a data-autoslide timing on the first fragment
|
||||
if( !fragment ) fragment = currentSlide.querySelector( '.fragment' );
|
||||
|
||||
var fragmentAutoSlide = fragment ? fragment.getAttribute( 'data-autoslide' ) : null;
|
||||
var parentAutoSlide = currentSlide.parentNode ? currentSlide.parentNode.getAttribute( 'data-autoslide' ) : null;
|
||||
var slideAutoSlide = currentSlide.getAttribute( 'data-autoslide' );
|
||||
|
||||
|
|
Loading…
Reference in New Issue