fullscreen mode for single images

matthias's Avatar

matthias

11 Jul, 2018 01:12 PM

hi dmitry,

I’m using royalslider with the fullscreenoption – not the native one, because this doesn’t work work as smooth as your demo, maybe because of my use of grid-layout.

but, for my question: on the pages I have (royalslider-)sliders as well as single images – and both should show a fullscreen image on click. therefor I would like to ask for your opionion: shall I use royalslider all the time, even for the single images, that don’t require a slider at all or should I use another gallery like lightgallery for both the royalsliders as well as the single images?

thank you
and kindest regards,
matthias

  1. Support Staff 1 Posted by Dmitry Semenov on 11 Jul, 2018 02:02 PM

    Dmitry Semenov's Avatar

    Hello,

    RoyalSlider isn't designed as a ligthbox, but you can dynamically initialize it, for example:

    1. Bind click event on elements that should open the gallery,
    2. Generate HTML markup for the slider,
    3. Set position:fixed to it, so slider overlays your content,
    4. Add the element to DOM and initialize the slider.

    Dmitry

  2. 2 Posted by matthias on 11 Jul, 2018 06:34 PM

    matthias's Avatar

    I know, therefor I thought maybe using something like lightgallery.js is more ressource-friendly instead of using royalslider for this?

    but would you recommend the mixed use of two such scripts?

  3. Support Staff 3 Posted by Dmitry Semenov on 12 Jul, 2018 05:10 AM

    Dmitry Semenov's Avatar

    It's your choice - either way can work. Tthe only issue with using both is that JS bundle size will increase significantly.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac