ListManager is a project mainly written in ..., it's free.
List Manager helps you with adding and removing rows in a list.
List Manager helps you with adding and removing rows in a list. The list can be made with div's or li's elements.
To initialise it:
new listManager(el[, options]);
Methods:
.add([options]);
AND
.remove(target);
AND
.removeAll();
Options:
You can change the options when using the .add([options]) method.
Events:
Tips:
This is a small script to help add buttons to add and remove a row inside a row.
var rowContent = function() {
var content = new Element('span', {'text': (new Date())});
var removeButton = new Element('a', {
'href': '#',
'class': 'listmanager-remove-row',
'html': '-',
'events': {
'click': function(el){
list.remove(document.id(el.target).getParent('.listmanager-row'));
}
}
});
var addButton = new Element('a', {
'href': '#',
'class': 'listmanager-add-row',
'html': '+',
'events': {
'click': function(el){
list.add({
'rowHTML': rowContent(),
'target': document.id(el.target).getParent('.listmanager-row')
});
}
}
});
return [addButton, removeButton, content];
};