I have several inline <script>
tags that appear in the middle of my HTML document. These all require Jquery, and a couple need JQuery UI.
JQuery and JQuery UI are linked at the bottom of the document.
How can I have the inline scripts run after JQuery and UI are ready.
I have tried wrapping the inline scripts with this with no success:
$(window).load(function() {
//
});
And I have also tried darbio's answer here using:
function defer(method) {
if (window.jQuery)
method();
else
setTimeout(function() { defer(method) }, 50);
}
defer(function () {
alert("jQuery is now loaded");
});
But this didn't seem to work either?