删除 jQuery Scrollable 插件中的特定轮播窗格 [英] Removing specific carousel panes in the jQuery Scrollable plugin
本文介绍了删除 jQuery Scrollable 插件中的特定轮播窗格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用 此可滚动插件,并且正在研究如何删除轮播窗格来自轮播组.
I am using this Scrollable plugin, and am looking at how to remove a carousel pane from the carousel group.
例如,如果我有 5 个轮播窗口 - 如何以编程方式删除轮播窗口 2?
As an example, if I have 5 carousel windows - how can I programmatically remove the carousel window 2?
推荐答案
检查这个
要删除特定选项卡,请使用此功能(对上例稍作修改的方法):
To remove a particular tab use this function (slightly modified method from the example above):
function removeItem(i) {
// get handle to scrollable api
var api = $("div.scrollable").scrollable();
// remove last item by using jQuery's remove() method
api.getItems().eq(i).remove();
}
removeItem(0); // will remove first item
removeItem(1); // will remove second
// etc.
这篇关于删除 jQuery Scrollable 插件中的特定轮播窗格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文