When I move my jQuery code residing inline from the template to an included .js file all explicit functions still work but all jQuery event-handlers stop working, they simply do nothing anymore:
still works:
function doit() {}
does NOT work anymore:
$("#my_id").click(function () {
});