Skip to content

on_new_slide Callback Option Implemented - #58

Open
Justin Bull (f3ndot) wants to merge 2 commits into
buildinternet:masterfrom
f3ndot:master
Open

on_new_slide Callback Option Implemented#58
Justin Bull (f3ndot) wants to merge 2 commits into
buildinternet:masterfrom
f3ndot:master

Conversation

@f3ndot

Copy link
Copy Markdown

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