I have an MVC application that utilizes ajax in order to fetch some data from the server and/or load partials. This is what I do in order to bind action to an element that doesn't necessarily exists on the page:
$(document).on("click",".helloWorld", function(){ alert("hello world") });
Is it a bad practice not to bind action directly to the element? In this case, should I have scripts directly on partial pages? Is it much slower? Can it sabotage performance if I have a dozen of similar methods on the page?