I can’t seem to get this to work in jquery. I am using this code as an alternative to having to define each button, however this does not work :/
http://jsfiddle.net/pufamuf/FV4jW/1/
Also, I was wondering if/how I can use more than one statement for each case. Thank you 🙂
You need to add a break after each case in your switch statement. Updated JSFiddle here.
From Wikipedia:
Updated Javascript: