jssor

Dynamically change height of slide for jssor


I'm using jssor plugin for slideshow of my content. There is a bunch of configuration options, which is great, but I can't find one for dynamically changing height of slide, and not sure if that is possible at all.

I see that one must specify height and width of outer container, and that slides will take its width and height. But can that be changed on the fly?


Solution

  • Hope the $ScaleHeight api help.

    instance.$ScaleHeight(); //Get scaled height
    instance.$ScaleHeight(height); //Scale the slider to new height and keep aspect ratio.