I have a jQuery onClick handler, writed with an anonymous function like that:
onClick
$(\"#selector\").on(\"click\" function(){ // do something }) <
You don't need the () for your function here:
()
$("#selector").on("click", namedFunction)