Skip to content
This repository has been archived by the owner on May 5, 2021. It is now read-only.

Container and parameters are not arguments in callbacks #389

Open
lucasmahle opened this issue Aug 19, 2015 · 0 comments
Open

Container and parameters are not arguments in callbacks #389

lucasmahle opened this issue Aug 19, 2015 · 0 comments

Comments

@lucasmahle
Copy link

There is no way to make an interaction or extension in callbacks unable to access the container and options scope. Changing the code and passing "element" and "settings" as a parameter in the callbacks I could extend the plugin and personalizing with my need. Without these two parameters, callbacks are stuck.

Line 302 of jquery.nivo.slider.js;

//settings.beforeChange.call(this);
settings.beforeChange.call(this, element, settings);

My code:

beforeChange: function(container, options){
    self = $(container);

    zero     = -55;
    hundred  = 0;

    start   = 0;
    end     = options.pauseTime;

    // Animation...
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant