Below is the function I am using in a JS file to initialize other parameters:
$(document).bind("ready", initialize);
When refreshing a page or visiting it for the first time, this function works well. However, if there is an ajax call on the page, the document may not be "ready" and therefore the initialize function may not be bound and called. Any suggestions on how to handle this?
$(document).bind("ready,ajax", initialize);