开发者

Removing specific carousel panes in the jQuery Scrollable plugin

开发者 https://www.devze.com 2023-02-08 22:59 出处:网络
I am using this Scrollable plugin, and am looking at how to remove a carousel pane from the carousel group.

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?


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.
0

精彩评论

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

关注公众号