Is there a way to ‘bind’ multiple functions to jQuery’s document.ready function without actually calling them in that method. Basically I don’t know which functions I might be calling in document.ready until the page is generated.
Is there a way to ‘bind’ multiple functions to jQuery’s document.ready function without actually
Share
There are several ways to handle this. (You probably want #2.)
Use an options class to determine
what happens, then have static code
which checks the options to see
which functions to call.
Wait until you know what functions
to call, and add each of them into
$(document).ready(whatever) as
separate lines.
Dynamically create the body of the one function you write into $(document).ready(…)