I am trying to remove an element from a list that is being displayed with a {^{for}}
loop by clicking an <i>
element. This could of course be achieved through jQuery's .on
as seen here: Todos example, Source Line 138
But I would like a jQuery-free approach or at least less binding. So I checked if the (e.g.) onclick
would help with the following:
<i onclick="console.dir(this);">delete</i>
But I found nothing helpful in the console.
Is there a way to retrieve jsViews compatible data from within the onclick
?
And if not: Is there a way to bind a helper or something to a DOM event? I'm imagining something like:
<i onclick=~deleteItem>delete</i>