I'd like to say hello to everyone at the beginning.
I'm a novice in JavaScript world and I have a question. I tried to create navigation for my first GSAP slider and I have no idea how to get started. I'd be grateful for all the tips.
Regards,
Novice
See the Pen LOBmNO by anon (@anon) on CodePen
To do that without jQuery, you need to loop through all the elements and add a click event listener. So something like this...
var controlElements = document.querySelectorAll(".slider-controls div");
Array.prototype.forEach.call(controlElements, function(element, index) {
element.addEventListener("click", function(event) {
TweenMax.killDelayedCallsTo(nextSlide);
TweenMax.killDelayedCallsTo(nextSlideDescription);
nextSlide(index);
nextSlideDescription(index);
});