I need help with adding a CSS file to the current HTML page using jQuery. Here is what I have:
var css = jQuery("<link>");
css.attr({
rel: "stylesheet",
type: "text/css",
href: "http://domain.com/chron/css/jquery.gritter.css"
});
$("head").append(css);
After the CSS file is downloaded, I want to call a specific function. My concern is ensuring that the CSS file is fully downloaded before calling the function. Can someone guide me on how to achieve this?