Hi I need to use Waypoints (I learn about and download the WAYPOINTS https://github.com/imakewebthings/waypoints/zipball/latest) in my Website and I have the next issue:
In my JS folder I have the next Javascript files:
I import the scripts like this, FIRST ADD THE noframework.waypoints.min.js FILE AND THEN MY estufas.js FILE in the tag of HTML5 code:
<script type="text/javascript" src="assets/js/noframework.waypoints.min.js"></script>
<script type="text/javascript" src="assets/js/estufa.js"></script>
My HTML5 code is:
<div class="container-fluid" id="firstCTA">
<div class="row">
<div class="col-12 text-center">
<img src="assets/imgs/clic-aqui.png" class="arrow-size">
<h3 class="cta-here-text"><b>Da clic aquí</b></h3>
<br>
</div>
</div>
</div>
And this is my Javascript code:
var waypoint = new Waypoint({
element: document.getElementById('firstCTA'),
handler: function(direction) {
alert("Main alert");
}
});
THIS EXAMPLE give me the next error:
I think to I'm be bad, maybe I need import more files because the Main folder have all the next content:
thanks for your help
Just add
jquery.waypoints.min.js
at the end of my code and IT WORKS. For more information see the next video: https://www.youtube.com/watch?v=5hPVpVtgle4&ab_channel=ThomasBradley