Coder Social home page Coder Social logo

Comments (15)

IanLunn avatar IanLunn commented on June 25, 2024

Please use the following:

var sequenceOptions = {
    autoPlay: false,
    startingFrameID: 2
} ;
var $sequence = $('#test').sequence(sequenceOptions).data("sequence");

This should do exactly what you've attempted to do above. Note the data() on the end of the Sequence initiation.

from sequence.

TranceGeniK avatar TranceGeniK commented on June 25, 2024

Thanks for your answer, but it isn't the purpose of this line, this was just for testing. I want to display 1 button per frame and affect an event on it to trigger transition

from sequence.

IanLunn avatar IanLunn commented on June 25, 2024

Then you can do something like this:

$(".myButton").click(function(){
    $sequence.goTo(2);
});

$(".myButton2").click(function(){
    $sequence.goTo(3);
});

Let me know if that helps. Please show me the HTML you are using if it doesn't.

from sequence.

TranceGeniK avatar TranceGeniK commented on June 25, 2024

That's what i've done. I tried several calls to this method but each time, my navigator (chrome or safari mobile) answered that the object hasn't got the method.
My HTML is dynamically generated by jQuery. Is that a problem ?

Did you ever had this issue?

from sequence.

IanLunn avatar IanLunn commented on June 25, 2024

Can you link me to your demo please?

from sequence.

TranceGeniK avatar TranceGeniK commented on June 25, 2024

--link removed--

sequence is in the "Palettes" div

from sequence.

IanLunn avatar IanLunn commented on June 25, 2024

You're initiating Sequence wrong, it should be this on line 220 of grapholine.js:

var $sequence = $palettes.sequence(sequenceOptions).data("sequence");

Then on line 231, you are trying to goTo frame 2 but you haven't put the goTo within an event (such as a click event). If you remove that, Sequence will work as it should.

from sequence.

IanLunn avatar IanLunn commented on June 25, 2024

Closed the issue as it isn't an issue with Sequence, but feel free to comment again if you need further assistance.

from sequence.

TranceGeniK avatar TranceGeniK commented on June 25, 2024

That's what i was doing in the beginning. As I said, this line is just for testing. I've written it back, but it still doesn't work... You can see it now if you want

from sequence.

TranceGeniK avatar TranceGeniK commented on June 25, 2024

The event is triggered by clicking on a number button on top

from sequence.

IanLunn avatar IanLunn commented on June 25, 2024

I downloaded it and there seems to have been a few modifications made to the Sequence script. If you reference the original v0.2 script, your page should work.

from sequence.

TranceGeniK avatar TranceGeniK commented on June 25, 2024

Oh Sorry...
I just remebered that i changed the name of the method in sequence.js...

In the first time, I forgot .data("sequence"). It's ok now.

Thank you for all.

from sequence.

IanLunn avatar IanLunn commented on June 25, 2024

No problem.

from sequence.

TranceGeniK avatar TranceGeniK commented on June 25, 2024

Not related to the issue, but just wanted to say a big thank you! I've just made what I wanted and it works great!
Little tip for ios : use 3d transformations, even for 2d (like -webkit-transform: translateX(750px) to slide) to avoid performances issues. They are hardware accelerated, unlike 2d's.

from sequence.

IanLunn avatar IanLunn commented on June 25, 2024

Glad you got it working and thanks for the tip.

from sequence.

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.