OwlCarousel2 / OwlCarousel2

DEPRECATED jQuery Responsive Carousel.

Home Page:http://owlcarousel2.github.io/OwlCarousel2/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fixed height, auto width image carousel + Owl V2 not working - Wordpress

conradstolze opened this issue · comments

Trying to get a carousel working in Wordpress with a fixed height for all images, but auto width - so each image would show it's full image/aspect ratio in the carousel (potentially making each image different widths). That appears to be what the Owl AutoWidth demo is doing, correct?
https://owlcarousel2.github.io/OwlCarousel2/demos/autowidth.html

So - I'm using the same settings (HTML, Javascript) as that example.

BUT - my biggest issue is that I can only get Owl V1 to work on my site, though haven't gotten autowidth to work like the Demo. Owl V2 doesn't initiate on the site, and I don't know whether it's required. If this can work in V1, then I'm fine with it - but nothing tells me whether the ability to do what I'm trying to do can only be done in V2.

My V1 JS setup (which displays Owl) is:

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.3/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.13.2/jquery-ui.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/owl-carousel/1.3.3/owl.carousel.min.js"></script>

My Owl V2 JS setup (which doesn't display with only the one change to V2 js) is:

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.3/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.13.2/jquery-ui.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/owl.carousel.min.js"></script>

When I have this in place, I get the JS error 'owlCarousel is not a function'

Any help appreciate. TIA