Hello, When a user clicks a button I dynamically load large CSS and JS files. I handle it in this way:
$("#say_hello").click(function() { $("body").prepend('<link type="text/css" rel="stylesheet" id="example" href="css/jquery-ui.min.css" />'); $.getScript("js/mail.js"); $("#say_hello_box").dialog("open"); }); It works great, but the problem is that sometimes the dialog box opens before the CSS has loaded. I would like to add the equivalent of $ ("#example").load(), since using load() does not seem to work. Can anyone recommend a way to do this? Thanks for the help.