abouolia/sticky-sidebar

How call public methods for the Sticky Sidebar jQuery version ?

nutika88 opened this issue ยท 3 comments

How can I call public updateSticky() methods for the jQuery version ?

var sidebar = $('.sidebar').stickySidebar({
    topSpacing: 60,
    bottomSpacing: 60
});

// This is not working for me
sidebar .updateSticky();

I'm trying to read the plugin code and find a way to do this but I can't see how.

var sidebar = $('.sidebar').stickySidebar({
    topSpacing: 60,
    bottomSpacing: 60
});

// update 
sidebar.stickySidebar('updateSticky');

// destroy
sidebar.stickySidebar('destroy');

please remove the blank space:

// update
sidebar.stickySidebar('updateSticky');

// destroy
sidebar.stickySidebar('destroy');