Coder Social home page Coder Social logo

Comments (4)

klinger-ofir avatar klinger-ofir commented on May 29, 2024

BTW, what I did was to just add this code to the end of the function:

var bjqsGo = function (direction, position) {
    //....
}
// Exposes the bjqsGo function
this.bjqsGo = bjqsGo;

return this;

Note that you need to save a reference to the bjqs instance:

var ref = $('#my-slideshow').bjqs({
    // options
});

Otherwise, every time you call the bjqs() function you will get another instance of it over the old one.

Now that you have a reference, you can call:

// Go forward
ref.bjqsGo('forward', false);

// Go backward
ref.bjqsGo('backward', false);

from basic-jquery-slider.

jcobb avatar jcobb commented on May 29, 2024

Hey, thanks for the feedback, I completely agree!

I have a new version of bjqs which is very close to release, I completely rebuilt the code-base and included a bunch of new features - exposing the 'go' function is one of them :)

Thanks again for taking the time to provide feedback, and thanks for using the slider.

from basic-jquery-slider.

sasmk avatar sasmk commented on May 29, 2024

Hi there, we've hooked a click event on the navigation buttons to simulate this function, e.g. to enable swiping for the slider:

$('#slider').bind('swipeleft', function() {
$('#slider a.bjqs-next').trigger('click');
});
$('#slider').bind('swiperight', function() {
$('#slider a.bjqs-prev').trigger('click');
});

You could easily adjust this code to "jump" to slides.

from basic-jquery-slider.

jcobb avatar jcobb commented on May 29, 2024

Have noted this, marked as future update, and will endeavour to include it in the next update. Thank guys :)

from basic-jquery-slider.

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.