GithubHelp home page GithubHelp logo

Changing slide speeds about bookblock HOT 8 CLOSED

codrops avatar codrops commented on August 23, 2024
Changing slide speeds

from bookblock.

Comments (8)

ruddog avatar ruddog commented on August 23, 2024

No , but you can do something like this. Add new public method to bookblock .

setSpeed: function(speed) {
                        this.options.speed = speed;
                },

and call it in onBeforeFlip(page) method. I hope explain myself clearly.

from bookblock.

angooose avatar angooose commented on August 23, 2024

Thanks, I'll try and work that out. I'm a bit of a beginner at this so trying to find my way.

from bookblock.

ruddog avatar ruddog commented on August 23, 2024

I find out that you dont need to extend bookblock object with new methods just use onBeforeFlip(page) method.

onBeforeFlip : function(page) {this.speed = (800*(page+1));} 

from bookblock.

angooose avatar angooose commented on August 23, 2024

Thanks very much, I now realise however that i was asking the wrong question what i want to be able to change is the interval time for a particular slide.

from bookblock.

ruddog avatar ruddog commented on August 23, 2024

Ok, you can do it the same way just use this.interval instead of this.speed and please close this issue.

from bookblock.

angooose avatar angooose commented on August 23, 2024

Thats cool. I still don't get where in here I tell it which slide i want that specific interval to work for? It just seems to affect every slide?

onBeforeFlip : function(page) {this.interval = (800*(page+1));}

from bookblock.

ruddog avatar ruddog commented on August 23, 2024

Page is parameter that give your index of current slide.this.interval = (800*(page+1)); was just for example. Take a look on updated demo http://codepen.io/ruddog/pen/Aqadk.

from bookblock.

angooose avatar angooose commented on August 23, 2024

That's excellent, thanks so much.

from bookblock.

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.