Coder Social home page Coder Social logo

Change Slide with a Navbar about slidr HOT 3 CLOSED

bchanx avatar bchanx commented on May 22, 2024
Change Slide with a Navbar

from slidr.

Comments (3)

bchanx avatar bchanx commented on May 22, 2024

Hey @cgarciae,

You can call slidr.slide([data-slidr-id]) to jump to a specific slide.

From the docs:

/**
 * Slide!
 * @param {string} next a direction ('up', 'down', 'left', 'right') or a `data-slidr` id.
 * @return {this}
 */
 function slide(next) {};

Let me know if you have any further questions.

from slidr.

cgarciae avatar cgarciae commented on May 22, 2024

Thanks a lot!!!! The docs are a little vague about this. Consider add something like

mySlider = slidr.create(...).start();

so people know how to use the API.

Also, how did you do the href #docs and #home trick to change the slides in slidr.js homepage (http://www.bchanx.com/slidr)? I mean, is there an easy default way or do I use the function you just gave me?

from slidr.

bchanx avatar bchanx commented on May 22, 2024

Hmm, there's already a section in the README/docs about how to use the javascript api.
Unless I'm missing something?

You'll have to roll your own solution to tie in breadcrumbs/anchors with the correct slide (but this is why the Slidr javascript api exists, so things like this are possible :)!) You can take a look at how I implemented it here if it helps!

from slidr.

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.