Skip to content

Commit

Permalink
added clear()
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewmueller committed Nov 11, 2012
1 parent e95a8ac commit a1cf94f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions list.js
Expand Up @@ -94,6 +94,18 @@ List.prototype.push = function(obj, fn, _action) {
return this;
};

/**
* Clear a list
*
* @return {List}
*/

List.prototype.clear = function() {
this.el.find('li').remove();
this.emit('clear');
return this;
};

/**
* Add an item to the top of the list
*
Expand Down

0 comments on commit a1cf94f

Please sign in to comment.