Coder Social home page Coder Social logo

Comments (7)

johnnycadelco avatar johnnycadelco commented on August 20, 2024

same question here.. I'd like this option

from bxslider-3.

heyimjuani avatar heyimjuani commented on August 20, 2024

This is what I did. Pretty simple:

var slider = $("#slider").bxSlider({
    controls: false,
    pager: true,
    auto: true,
    etc, etc, etc
});
$(".bx-pager a").click(function(){
    slider.startShow();
});

This should deffinitely be a built in setting! Good luck you guys, hope this helps

from bxslider-3.

 avatar commented on August 20, 2024

[SOLVED] Hi i had the same problem while trying to implement bxslider on my site. My problem was, when i click prev or next button it stops. I changed the following lines in jquery.bxslider.js file @ line 607 & 620. There is a DOM object for prev & next called PrevBind & NextBind

var clickNextBind = function(e){
// if auto show is running, stop it
if (slider.settings.auto) el.stopAuto(); --> el.startAuto();
el.goToNextSlide();
e.preventDefault();
}

var clickPrevBind = function(e){
// if auto show is running, stop it
if (slider.settings.auto) el.stopAuto(); --> el.startAuto();
el.goToPrevSlide();
e.preventDefault();
}

Hope this helps everyone, Njoy life!!!!

from bxslider-3.

freelancerrs avatar freelancerrs commented on August 20, 2024

even better, in jquery.bxslider.js:

    var clickNextBind = function(e){
        // if auto show is running, stop it
        if (slider.settings.auto) el.stopAuto();


        el.goToNextSlide();
        e.preventDefault();

        el.startAuto();    //  ---------------------------------------------- JUST ADD THIS LINE

    }

    /**
     * Click prev binding
     *
     * @param e (event) 
     *  - DOM event object
     */
    var clickPrevBind = function(e){
        // if auto show is running, stop it
        if (slider.settings.auto) el.stopAuto(); 
        el.goToPrevSlide();
        e.preventDefault();

        el.startAuto();   // ---------------------------------------------- JUST ADD THIS LINE

    }

from bxslider-3.

moabi avatar moabi commented on August 20, 2024

and for only the pager :

    $('.bx-pager-item a').click(function(e){
        var i = $(this).index();
        slider.goToSlide(i);
        slider.stopAuto();
        restart=setTimeout(function(){
            slider.startAuto();
            },500);

        return false;
    });

from bxslider-3.

grinvladimir avatar grinvladimir commented on August 20, 2024

for 4.1.2 working code:

$('.bx-pager-item a').click(function(e){
  var i = $(this).data("slide-index");
  slider.goToSlide(i);
  slider.startAuto();
  return false;
});

from bxslider-3.

upvas avatar upvas commented on August 20, 2024

This works for me:

var slider = $('.slider');
    slider.bxSlider({
        auto: true,
        autoControls: true,
        etc,
        onSlideAfter: function() {
            slider.startAuto()
        }
    });

from bxslider-3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.