Skip to content

Is there a way to change the default value of the onCreate callback function? #665

Closed
@jiniC

Description

@jiniC

because of this issue : #663
I would like to put this bugfix function as the defaults property of onCreate.
Due to the circumstances of the project, I can't call a function for fixing bugs with onCreate callbacks everywhere I am creating mCustomScrollbar.
onCreate callbacks everywhere I am creating mCustomScrollbar.
Is there a way to make this bugfix function default to the onCreate function, other than by modifying the library script itself?

I tried this method,

$.mCustomScrollbar.defaults.callbacks.onCreate = function () { mCustomScrollbarBugFix(this); };

but it didn't work because the onCreate function was replaced after the mCustomScrollbar was created and already tried to call the onCreate function. Also, this method was not possible because I had to go through all the mCustomScrollbars and pass the appropriate arguments.

Is there any other way?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions