Detect slide position in JQuery SLY plugin

0

Hello. I would like to know how I detect the current position of a slide using the Sly plugin.

The type I use is 'oneperframe'. I do not have much knowledge of jquery, and even less with this plugin. I visited link but it was not very didactic. ....

If nobody knows, but is aware of a slideshow (for HTML content and not just images) similar to that in which I can detect the position of the slide every time I change (onscroll), it is also welcome. Thank you.

    
asked by anonymous 18.07.2017 / 17:19

1 answer

0

On my own I did it. I've been trying and trying and found a part of the original code that runs with every slide change.

1. Go to the sly.min.js file. Find the following snippet:

(a = Ib [d.centerItem] .center), Pb & rb.activateMiddle & T (d.centerItem)): e & & & [d.firstItem] .start)}

2. In this final part, start)} before and enter your role. I have identified two variables, Jb.activeItem and sb.pos . I did the following: .... firstItem] .start); function (Jb.activeItem);}

This part is executed with each movement, that is, in real time. In a single slide change, this stretch runs dozens of times. So, anyone who wants to use it will have to create a control function, to execute a command only when there is a slide change (Jb.activeItem). Okay, the hard part is already solved.

    
20.07.2017 / 16:10