AmpersandJS/ampersand-dom — pull request #7 by fyockm (2014-10-08 14:36:49+00:00)
Title: Add toggle to simplify show/hide

Perhaps there's an easier way to do this. I'm trying to show and hide a subview (which holds a collection), based on a click event.
If there's not a better way, this seems to work well.

Here's my use case:
view:
```
events: {
'click [data-hook~=toggle_activities]': 'toggleActivities'
},
toggleActivities: function () {
var activitiesEl = this.queryByHook('activities');
dom.toggle(activitiesEl);
},
subviews: {
activities: {
container: '[data-hook=activities]',
waitFor: 'model.activities',
prepareView: function(el) {
return new CollectionRenderer({
el: el,
collection: this.model.activities,
view: ActivityView
});
}
}
},
```
template:
```
Activities

```