Tagged: x
-
AuthorPosts
-
August 3, 2016 at 8:07 pm #1116408
Hi
I have a revslider carousel setup in X (see details in next post).
It seems as though the obvious way to navigate between carousels would be to click on a carousel item to bring it into focus.
However it requires the user to either click the navigation buttons, or to drag the carousel item into focus.
How can I make a carousel item come into focus (become active) when simply clicked?
I could probably do this myself with jquery but I don’t see which class(es) need to be actvated — if you could help me with this at least that would be great.
Thank you
August 3, 2016 at 8:08 pm #1116410This reply has been marked as private.August 4, 2016 at 12:48 am #1116772Hi there,
It depends on your slider’s revapi instance. Example, Leadership slider uses revapi4. And you can always find it from your Slider’s API Function setting.
Please add this code to your slider’s custom javascript.
jQuery( function($) { $('#rev-leadership').on('click', function(){ revapi4.revnext(); } ); } );
Hope this helps.
August 8, 2016 at 4:38 pm #1122784Thanks for that! So how would I make clicking a specific slide go to that specific slide?
I guess it’s something like this, but as you can see I’m not quite there:
jQuery(function($) { $('#leadershipo-slide').on('click', function() { var slide = // not sure how to get data-index="variable" // revapi4.revshowslide(slide); }); });
August 9, 2016 at 4:24 am #1123419Hi,
You can try this code.
jQuery(function($) { $('#leadershipo-slide').on('click', function() { var slide = $(this).attr('data-index'); revapi4.revshowslide(slide); }); });
Hope that helps
August 10, 2016 at 10:53 pm #1126676Thanks a lot for your help – it got me to my solution.
For those looking to do this in future:
jQuery(function($) { $('#SLIDERID li').on('click', function() { var slide = $(this).attr('data-index'); console.log(slide); revapi##.revcallslidewithid(slide); }); });
Where SLIDERID is the ID for your slider (set in Revolution Slider settings)
And where revapi## is the api number for your slide (viewable in Revolution Slider settings)Thanks again
August 11, 2016 at 2:46 am #1126863You’re welcome and thanks for sharing the final code 🙂
-
AuthorPosts