开发者

Removing jScrollPane from a element

how can I remove completely the jScro开发者_高级运维llPane from an element that it is applied?


For the current version v2.0.0beta11 - 2011-07-04. You first need to retrieve the api. Then call the destroy method.

var element = $('. myownscrollpane').jScrollPane(); 
var api = element.data('jsp');
api.destroy();


if you're using jScrollPane 1.2.3 (or similar) you can check this: http://www.kelvinluck.com/assets/jquery/jScrollPane/remove.html

You need to call jScrollPaneRemove() on the container i.e. $('.myownscrollpane').jScrollPaneRemove();

This function isn't avail. on the latest version 2.x (http://jscrollpane.kelvinluck.com/), reasons for it by Kelvin Luck (jScrollPane author) on Google jScrollPane group.

I hope that will help a bit :)

Cheers

G.


There is currently a fork of jScrollPane on github which has a destroy method added:

https://github.com/blackjid/jScrollPane/commit/d3cdee394f708a7bce5c0875f673bfc70484fa0b

I will be integrating this patch into the official jScrollPane release as soon as I have the time to bring it across and test it...

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜