I want to load a function when an on event is triggered.
I have this code but it doesn't work.
function myFunction(data){
alert(data);
}
$(".element").on('keyup', myFunction('a'));
I do not want to call the function like this:
$(".element").on('keyup', function(){
myFunction('a');
});
How do I make this work? Peter