问题
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