fix issue that caused data-auto-animate to be added to the wrong slides

This commit is contained in:
Hakim El Hattab
2020-02-16 19:14:46 +01:00
parent d2796f56b8
commit c38bc2c611
2 changed files with 15 additions and 9 deletions

View File

@ -37,6 +37,10 @@
<h3>h3</h2>
</section>
<section>
<h1>Non-auto-animate slide</h1>
</section>
</div>
</div>
@ -46,7 +50,7 @@
<script>
const slides = [].slice.call( document.querySelectorAll( '.slides section' ) ).map( slide => {
const slides = Array.prototype.map.call( document.querySelectorAll( '.slides section' ), slide => {
return {
h1: slide.querySelector( 'h1' ),
h2: slide.querySelector( 'h2' ),