jquery - Loading all widget assests with a single call? -
i'm wondering if it's @ possible (either natively or through plug-ins) make single call url , have return both css , js files single widget. assuming have control of both request , response of such request.
would possible (and if so, how) or overly optimistic?
you don't need request? can add stylesheet / js file dynamicly.
// js $.getscript("http://www.domain.com/script.js", function(){ alert("script loaded"); }); // css var url = "http://www.domain.com/style.css"; $('head').append( '<link rel="stylesheet" type="text/css" href="' + url + '" />' );
other ways:
- do ajax call , add js head css done above.