Is it possible passing a function with a custom data attribute?
This does not work:
<div data-myattr="hello();">
</div>
function hello(){
console.log('hello');
}
When I get the attribute it's a string with the value "hello();" instead of the function. How to solve this?