I try to use viewpoint and I Pass the values to my waypoint it send my this message: Uncaught Error: No element option passed to Waypoint constructor,I got my code like this:
in my view galeri.vue :
<template>
<div class="play-top" id="final">
<iframe src="xxxxxxxxx" allowfullscreen autoplay="false"></iframe>
</div>
</template>
<script>
require('waypoints/lib/jquery.waypoints.min.js')
var ele
var waypoint = new Waypoint({
element: ele = document.getElementById('final'),
handler: function(direction) {
if (direction == 'down') {
$(ele).addClass('muestra')
} else {
$(ele).removeClass('muestra')
}
console.log(direction);
}
});
<script>
any idea what I am doing wrong