Flickity.js gallery crashes on load
0
I am trying to load a simple js based gallery - Flickity.js As per mentioned in the example, i tried loading up the gallery which works perfectly fine . But randomly, the gallery crashes upon page load: the code that i use to initiate the gallery: <script src="https://unpkg.com/flickity@2/dist/flickity.pkgd.min.js"></script> <script> $('.main-carousel').flickity({ // options cellAlign: 'left', contain: true, pageDots: false, }); </script> I do understand that this maybe related to the document (images not loading) at the time the script is initiated so as a result , i tried including the document.ready function which infact throws another error . $( document ).ready(function() { $('.main...