开发者

Javascript ContentFlow library, Remove All Items and Add New

Hey guys I am using the javascript ContentFlow library found HERE.

I am loading items with jquery/ajax based on search criteria.

What I need to do is remove all of the old items before loading new items.

This works fine with a small amount of photos( less than 4) but anything more causes long running script errors.

To remove a开发者_运维技巧ll of the items I am looping and calling the rmItem() function

function clearResults() {
    var itemCount = resultFlow.getNumberOfItems();
    for (var i = 0; i < itemCount; i++) {
        resultFlow.rmItem(0);
    }
}

Any ideas how to accomplish this?


I ended up just adding a clearItems function to the library. There was no built in functionality to reliably support this.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜