Theme | Prestige - flickity slider not showing quick fix

Add the below code to the page with the slider (homepage, product page, etc).

The issue is the height is not being drawn when the page loads. The code below will simulate a browser resize to kick the height of the flickity slider to take effect.

<script>
$( document ).ready(function() {
        if (typeof(Event) === 'function') {
                // modern browsers
                window.dispatchEvent(new Event('resize'));
        } else {
                // for IE and other old browsers
                // causes deprecation warning on modern browsers
                var evt = window.document.createEvent('UIEvents'); 
                evt.initUIEvent('resize', true, false, window, 0); 
                window.dispatchEvent(evt);
        }
});
</script>

Leave a comment