param | type | description |
---|---|---|
accessor | function | accessor for the element whose style should be modified |
style | Object or Function | styles to apply |
rm | Function | function to remove element from view (usually from an array) |
#Usage
m('.list', [
m('.item', [
m('.btn.remove', {
onclick: remove_style({
accessor: function(ev){ return ev.target.parentNode;},
style: {opacity: '0'}
})
})
])
])