Skip to content

Code Plugin - Passing more than one rule #248

Open
gfranko opened this Issue Dec 4, 2012 · 0 comments

1 participant

@gfranko
gfranko commented Dec 4, 2012

When using the popcorn.js code plugin, is it possible to pass more than one start/end rule object? I realize I could very easily call the code() method as many times as I needed, but I just wanted to see if there was already an elegant way to handle this.

The documentation shows how to use one rule like this:

var pop = Popcorn( "#video" );

pop.code({
    start: 1,
    end: 3,
    onStart: function( options ) {
        document.getElementById( "test1" ).innerHTML = "Yes";
    },
    onEnd: function( options ) {
        document.getElementById( "test1" ).innerHTML = "No";
    }
});

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.