fabiorino / crelly-slider

A free responsive slider for WordPress that supports layers. Add texts, images, videos and beautify them with transitions and animations.
MIT License
104 stars 36 forks source link

getCurrentSlide(), getTotalSlides() do not work #34

Open onigetoc opened 7 years ago

onigetoc commented 7 years ago

getCurrentSlide(), getTotalSlides() do not work

Have you some suggestion to how to use them? because my console log tel me that these functions do not exist.

fabiorino commented 7 years ago
var current_slide = jQuery('.crellyslider-slider-your_slider_alias').data('crellySlider').getCurrentSlide();
var total_slides = jQuery('.crellyslider-slider-your_slider_alias').data('crellySlider').getTotalSlides();

It's all written at the end of the documentation that you can find here: http://fabiorino1.altervista.org/projects/crellyslider/documentation/

onigetoc commented 7 years ago

Thank you, i saw it but it didn't worked. but i used .length to get total.

fabiorino commented 7 years ago

If you copy-pasted that code, you should try to replace apexes (') with quotes (")

onigetoc commented 7 years ago

Ok thank you