Codeinwp / Ideal-Image-Slider-JS

Quite simply the ideal Image Slider in vanilla JS.
http://idealimageslider.com
GNU General Public License v3.0
1.57k stars 160 forks source link

onInit setting height to 100vh #91

Open devWaleed opened 7 years ago

devWaleed commented 7 years ago

I am trying to set height of parent container 'slider' to 100vh on init and it won't work.

    var slider = new IdealImageSlider.Slider({
        selector: '#slider',
        transitionDuration: 0,
        disableNav: true,
        interval: 5000,
        onInit: function()
        {
            $('#slider').css('height', '100vh');
        },
        afterChange: function()
        {
            $('#slider').css('height', '100vh');
        }
    });

However it works on afterChange and other events. I can't set it with css either.