• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

删除 jQuery Scrollable 插件的特定轮播窗格

用户头像
it1352
帮助1

问题说明

我正在使用 此可滚动插件,并且正在研究如何删除轮播窗格来自轮播组.

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?

正确答案

#1

检查这个

要删除特定选项卡,请使用此功能(对上例稍作修改的方法):

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.

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /reply/detail/tangjechk
系列文章
更多 icon
同类精品
更多 icon
继续加载