I’d like to add event keyup for an element like a div like this:
<div class="my-div" data-action="keyup->myController#myfunction"></div>
But it’s impossible. I don’t want to use $(document).bind(‘keyup’, function(e){ … }).
How to do ? Thanks
I’d like to add event keyup for an element like a div like this:
<div class="my-div" data-action="keyup->myController#myfunction"></div>
But it’s impossible. I don’t want to use $(document).bind(‘keyup’, function(e){ … }).
How to do ? Thanks
I found:
<div class="my-div" data-action="keyup->myController#myfunction" tabindex="0"></div>
It’s work !