3

How to add custom event in html tag like:

<button oncustomevent="doSomething('string')">

Thanks in advance

Shafi PS
  • 371
  • 5
  • 18
  • What is your custom event ? can you give example? – Code Lღver Apr 21 '15 at 08:56
  • You can add like above but it won't work if you fire your custom event. It is always better to use JavaScript :) – Vigneswaran Marimuthu Apr 21 '15 at 08:57
  • I want to fire an event after 5 sec on click event. I know it is possible in javascript using setTimeout(), but I just want to add an event onafterclick() – Shafi PS Apr 21 '15 at 09:07
  • Don't underestimate the power of JavaScript :p ... No Seriously, why do you need a custom event.. whatever events that were best possible is already provided by JS.. If you need some action then probably functions would help... – Sumeet Gavhale Apr 21 '15 at 09:07

0 Answers0