CMS Development

MMerry
Member

How do I displaying multiple images on one slide on the image slider?

Hi, 

 

Please can somebody help me with the javascript code for applying multiple images on one slide in the image slider.

 

I have taken a look at this post and added the code to my landing page template .js file and the page is displaying a funtion error .slick doesn't exist. The same happens when I use .hsSlick.

 

I am proficient in html and css, but I'm afraid I don't know much javascript so it is probably something really simple that I'm missing.

 

I would really appreciate any help on this. 

 

Many thanks,

Marie

0 Upvotes
2 Replies 2
Kevin-C
Recognized Expert | Partner
Recognized Expert | Partner

How do I displaying multiple images on one slide on the image slider?

Hey @MMerry 

 

Could you post the code you've attempted to use? With that we should be able to better diagnose the issue.

 

With that said, if you're getting an error saying somthing does not exist it could mean that the JS library you've attched to the page has not yet loaded when the browser tried to use it.

 

This jQuery documentation might help get you moving in the right direction.

Kevin Cornett - Sr. Solutions Architect @ BridgeRev
MMerry
Member

How do I displaying multiple images on one slide on the image slider?

Hey @Kevin-C,

 

Thanks for coming back to me and for your pointer to the jQuery documentation, it did really help and I'm not getting an error.

 

However, it is still not working. Here's the code:

<script type="text/javascript" src="{{ get_public_template_url('/MM_Templates/slick-min.js') }}"></script>
<script type="text/javascript">
$(document).ready(function(){
$('.hs_cos_gallery').slick({
infinite: true,
slidesToShow: 3,
slidesToScroll: 3
});
});
</script>

 

To be honest, I think I've decided to give up and just pick five of the best logos and have them static on the page. I've spent too long on this now 😞

 

 

0 Upvotes