I don't think this line works like you think it does. Lemme prepare an example.
If you wrote:
function do_the_thing(string) { console.log(string); }; $(document).ready(function () { do_the_thing("one"); }); $(document).ready(do_the_thing("two")); $(document).ready(function () { do_the_thing("three"); });
Then it would print out:
two one three
Because in the case of one and three, you're passing the function itself into $(document).ready(...), but in the case of two -- you're calling the function before the page is ready, and then passing the value of whatever it returns into $(document).ready(...).
$(document).ready(...)
cool!
:+1:
Thanks!