In traditional code I will pass arguments to link button like this:
<a href="javascript:call_hello(1, 2, 3)" role="button">Hello</a>
How can I do it in unobtrusive JavaScript style with JQuery or similar library.
<a href="#" class="hello" arg1="1" arg2="2" arg3="3" role="button">Hello</a>
Do not focus that code is longer since it is only example. I want attach Javascript code in such way.
$(".hello").on('click', call_hello2);
Can you suggest the best solution in your opinion for unobtrusive JavaScript style (attaching Javascript by matching elements not by html code).