I have this which should run the function on load and also on resize:
$(window).resize(stuffForResizeAndReady);
$(document).ready(stuffForResizeAndReady);
however, the function does NOT run on load, but runs on resize, I did this to check:
if ($("#table").length) {
alert("element found");
}
.. and it doesn’t show the alert, however when resized, it does.
it seems as if the whole script is only activated on first resize, not before.
Move these two lines outside your $(document).ready block:
Also move the definition of that
stuffForResizeAndReadyfunction (as suggested in a comment below).