My query is a bit trivial but I am not sure if I am doing everything correctly.
I am trying to call a function when a checkbox is clicked.
window.onload = function(){
$("#checkboxid").click(myfunction());
}
function myfunction (){
//Code here
}
The myfunction function isn't called upon clicking the checbox and I have checked in the browser debugger as well that it's not being called. Can anyone please help in pointing out why?