Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

on_new_slide Callback Option Implemented #58

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

f3ndot
Copy link

@f3ndot f3ndot commented Mar 1, 2012

I personally found it useful for the plugin to provide a callback option when a new slide / image is displayed. I've written in support under the option name of "on_new_slide". Demo of this is in demo.html and I've updated the version number to 3.2.8 as a result of this addition.

First time doing this, so let me know if I've done something wrong. I believe it's alright.

<script type="text/javascript">
    function callback() {
        alert('success!');
    }
    jQuery(function($){
        $.supersized({
            on_new_slide    :   callback,   // Calls a function when a new slide/image is loaded
            slides          :   [
                {...}
            ]
        });
    });
</script>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant