Jump to content

Including javascript in prestashop


vins1234

Recommended Posts

How do I include custom javascript code in prestashop. I want to include the following code in product-list.tpl so that it renders the javascript on the category pages.

[removed]

   $(document).ready(function(){
       var slider = $('#slider1').bxSlider();

       $('.thumbs a').click(function(){
           var thumbIndex = $('.thumbs a').index(this);
           slider.goToSlide(thumbIndex);
           $('.thumbs a').removeClass('pager-active');
           $(this).addClass('pager-active');
           return false;
       });

       $('.thumbs a:first').addClass('pager-active');

   });

[removed]



Thank you.

Link to comment
Share on other sites

Do you by any chance know how to include a custom slider/carousel on the products page listing all product images in a category as thumbnails and the main slider contains the enlarged image of the clicked product thumbnail.

I have attached a screenshot of what I want to achieve.

Thanks for your help.

45038_L9R8N4fHql5LojXNrYUX_t

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...