I did well so far, but i am not able to implement this into an html object.
http://jsfiddle.net/fkyk2b8y/48/
Let's assume i have an html element like <input type='text' id="textareaID" onkeyup="myFunction(this.id)" /> and i'd like to implement like this :
function myFunction(elementID){
$('#'+elementID).keypress(function (e){
...
...
...
});
}
It doesn't work properly after implementation as you can try from the fiddle demo.
Thanks in advance.
---UPDATE---
I have many html outputs and they all have different ID values. I want to use same function for all of these html inputs. I don't know how to implement, otherwise JS side is working quite well.
onclickon element and injavascriptalso?keypressin javascript, remove inline handler