Jump to content

Change direction of slide


alirezaok

Recommended Posts

I am using of last version of prestashop.

 

in bxslider of it that used of default slide mode (horizontal) I want to change direction of it. it moved right to left but I want to move left to right. (because I used of right to left language)

 

any one can help me to change bxslider core or is this option to set for this change?

 

thanks

Link to comment
Share on other sites

ok thank you so open file:

 

/themes/default-bootstrap/modules/homeslider/js/homeslider.js and add  autoDirection: 'prev',

to: $('#homeslider').bxSlider({})

 

modified code:
 

$('#homeslider').bxSlider({
		    autoDirection: 'prev',
			useCSS: false,
			maxSlides: 1,
			slideWidth: homeslider_width,
			infiniteLoop: homeslider_loop,
			hideControlOnEnd: true,
			pager: false,
			autoHover: true,
			auto: homeslider_loop,
			speed: homeslider_speed,
			pause: homeslider_pause,
			controls: true,
            onSlideBefore: function (currentSlideNumber, totalSlideQty, currentSlideHtmlObject) {
                $('#homeslider li').removeClass('active');
                $('#homeslider li').eq(currentSlideHtmlObject+1).addClass('active') 
            }
		});

by default automatic scroll will scroll slides in different direction (previous instead next)

Link to comment
Share on other sites

  • 7 months later...

Hi,

 

unfortunatelly this doesn´t work with PS1.6.05

 

my homelider.js file looks like this and don´t know how to change the slide direction.

 

Ths., reg. Mark

 

 

: $(document).ready(function(){

    if (typeof(homeslider_speed) == 'undefined')
        homeslider_speed = 500;
    if (typeof(homeslider_pause) == 'undefined')
        homeslider_pause = 3000;
    if (typeof(homeslider_loop) == 'undefined')
        homeslider_loop = true;
    if (typeof(homeslider_width) == 'undefined')
        homeslider_width = 779;


    if (!!$.prototype.bxSlider)
        $('#homeslider').bxSlider({
            useCSS: false,
            maxSlides: 1,
            slideWidth: homeslider_width,
            infiniteLoop: homeslider_loop,
            hideControlOnEnd: true,
            pager: false,
            autoHover: true,
            auto: homeslider_loop,
            speed: homeslider_speed,
            pause: homeslider_pause,
            controls: true
        });

    $('.homeslider-description').click(function () {
        window.location.href = $(this).prev('a').prop('href');
    });
});

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...