Srcset and multiple galleries

soundstormvfx's Avatar

soundstormvfx

22 May, 2020 11:47 AM

Hi!

I love your slider, I bought several of them and will continue to use/buy it. Congrats on a great product with a fair price and very good support! ;)

I use 2 sliders on one page and I would like to use srcset and lazyloading. I use this script, which you linked in the forum:
http://jsfiddle.net/DmitrySemenov/danpsx91/

It works almost perfectly, but on the second slider, only the slides/images that are preloaded per script (numImagesToPreload) are displayed. After that it's just black with the caption in it.

Unfortunatly I have no idea what could be wrong. Can you help?

Thanks a lot for your help.

  1. Support Staff 1 Posted by Dmitry Semenov on 22 May, 2020 12:36 PM

    Dmitry Semenov's Avatar

    Hello,

    You may wrap everything in a loop, something like:

    $('.royalSlider').royalSlider({
        autoScaleSlider:false,
        // other options ...
    });
    
    $('.royalSlider').each(function() {
      var slider = $(this).data('royalSlider');
    
       // do something with slider object, this code will trigger for each slider
    });
    

    I hope it helps.

  2. 2 Posted by soundstormvfx on 03 Jun, 2020 05:13 PM

    soundstormvfx's Avatar

    I got it working! :)

    Thanks Dmitry!

  3. soundstormvfx closed this discussion on 03 Jun, 2020 05:13 PM.

Comments are currently closed for this discussion. You can start a new one.

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