开发者

jQuery jScrollPane: how to disable?

开发者 https://www.devze.com 2023-03-20 06:06 出处:网络
I need a command that would disable jQuery jScro开发者_运维技巧llPane when a certain condition is met.

I need a command that would disable jQuery jScro开发者_运维技巧llPane when a certain condition is met.

Couldn't find it anywhere online, hope someone on StackOverflow knows the solution.

I would appreciate your sharing it with me!


var a = false;
var api = $('.scroll-pane').jScrollPane({/*params*/});

if(a !== true)
{
    api.destroy();
}

Documentation on destroy();


var a = false;
var api = $('.scroll-pane').data('jsp');

if(a !== true)
{
    api.destroy();
}

To update @AlienWebguy 's answer, in 2015 this is the way to destroy jScrollPane

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号