I've come across this problem and quickly used the two functions as a way to add and remove information to the fragment in the form of an array.
function AddItemToFragment(newItem) {
var items = $.bbq.getState("itemArray");
if (!items)
items = new Array();
items.push(newItem);
$.bbq.pushState({itemArrray: items});
}
function RemoveItemFromFragment(itemToRemove) {
var items = $.bbq.getState("itemArray");
for (var i = items.length - 1; i >= 0; i--) {
if (items[i] === itemToRemove)
items.splice(i, 1);
}
$.bbq.pushState(items);
}
I'm not quite happy on how these functions work, there must be a nicer way than creating an array object and rewriting the string. I'll have another look at this later and if I come to anything I'll post it up here.