Removing specific carousel panes in the jQuery Scrollable plugin

99封情书 提交于 2019-12-23 03:34:14

问题


I am using this Scrollable plugin, and am looking at how to remove a carousel pane from the carousel group.

As an example, if I have 5 carousel windows - how can I programmatically remove the carousel window 2?


回答1:


Check this

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.


来源:https://stackoverflow.com/questions/1270258/removing-specific-carousel-panes-in-the-jquery-scrollable-plugin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!