johnk12 Posted August 3, 2011 Share Posted August 3, 2011 I'm using the included Prestashop module 'Products Category v1.3' to show other products in the same category on the product page. I would like it to auto scroll right after a few seconds - anyone know how this can be achieved? Just to be clear - When you click on the right arrow the images slide, I want this to happen automatically. prestashop 1.4.3 Link to comment Share on other sites More sharing options...
johnk12 Posted August 3, 2011 Author Share Posted August 3, 2011 add $('#productscategory_list').serialScroll({ interval: 1,//auto scroll constantly easing:'linear' }); after $('#productscategory_list').trigger( 'goto', 0); in productscategory.js Link to comment Share on other sites More sharing options...
johnk12 Posted August 3, 2011 Author Share Posted August 3, 2011 Ignore that nonsense. Edit modules/productscategory/prodoctscategory.js so it looks like this. function pc_serialScrollFixLock(event, targeted, scrolled, items, position) { var leftArrow = position == 0 ? true : false; var rightArrow = position + 5 >= $('#productscategory_list li:visible').length ? true : false; $('a#productscategory_scroll_left').css('cursor', leftArrow ? 'default' : 'pointer').fadeTo(0, leftArrow ? 0 : 1); $('a#productscategory_scroll_right').css('cursor', rightArrow ? 'default' : 'pointer').fadeTo(0, rightArrow ? 0 : 1).css('display', rightArrow ? 'none' : 'block'); return true; } $(document).ready(function() { $('#productscategory_list').serialScroll({ items: 'li', prev: 'a#productscategory_scroll_left', next: 'a#productscategory_scroll_right', axis: 'x', offset: 0, stop: true, onBefore: pc_serialScrollFixLock, duration: 300, step: 1, lazy: true, lock: false, force: true, cycle: true, interval: 3000//auto scroll constantly }); $('#productscategory_list').trigger( 'goto', 0); }); More: http://flesler.blogspot.com/search/label/jQuery.SerialScroll Link to comment Share on other sites More sharing options...
doubleD Posted August 16, 2011 Share Posted August 16, 2011 Thank you johnk12! Works great. I think you should mark this topic as [sOLVED] Link to comment Share on other sites More sharing options...
Nagraj Posted October 17, 2012 Share Posted October 17, 2012 It is not working in Prestashop1.5 any idea??? Link to comment Share on other sites More sharing options...
MissLili Posted May 25, 2014 Share Posted May 25, 2014 How about 1.6? 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now