Ascensor controls created programmatically

94 Views Asked by At

I am using the Ascensor Framework

I am wondering if its possible to create next and previous buttons programatically rather than through using the class of the specific element you want to scroll to?

I can see from the the .js file that there are functions created for this process next() for example.

However when I try to use this function in my own script file called after this framework is loaded in, it is not defined.

1

There are 1 best solutions below

0
AudioBubble On BEST ANSWER

For anyone that might be interested, I delved into the framework and found the following -

$("element").on("click", function() {
     next();
});

Just change the element to the class/id of your own element