Your Cart

Target multiple sliders individually on a page.

These forums are now closed to new replies / tickets.

Please open a support ticket from our new Support page.

Front Page Forums Questions Target multiple sliders individually on a page.

  • gravatar
    James Scoville
    May 4, 2015 at 2:56 pm

    Hey there, I’ve read through the forums but haven’t been able to
    find an answer to this specific question.

    I have a page with 2 Galleria sliders on it, and I would like to
    make them both keyboard accessible – normally, this can be
    easily done by using the attachKeyboard method inside of a
    Galleria.ready function. However, one of the sliders is hidden on
    the page initially and I would like to toggle the keyboard control
    between the 2 sliders depending on which one is being focused
    on.

    I’m initiating the sliders with:
    Galleria.run("#Slider1", "#Slider2");

    but I would like a way to target individual sliders like
    this:
    $("#Slider1").Galleria.ready(function(){
    this.attachKeyboard({
    right: this.next,
    left: this.prev
    }); });

    TLDR; I need a way of targeting sliders individually instead of
    setting controls for the very general Galleria class.

    Thanks in advance!
    James


Galleria.io uses cookies to store information. You can read more about that in our Privacy Policy. I understand