2009-08-13 54 views

回答

3

檢查this

要刪除某個特定的標籤使用該功能(從上面的例子稍微改進的方法):

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

由於鐳叫喊 - 花了很多時間在此頁上,但無濟於事。這僅僅演示了僅從最後刪除窗格。如果我想從此示例中刪除窗格2,該怎麼辦?如果你能提供代碼來做到這一點,我會很感激,因爲我沒有多少運氣。謝謝。 – tonyf 2009-08-13 06:02:56

+0

'api.getItems()。eq(1).remove();' - 這應該刪除第二個窗格 – RaYell 2009-08-13 06:04:42

+0

謝謝 - 將嘗試它並讓你知道。 – tonyf 2009-08-13 06:13:08