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:

  1. do ajax call , add js head css done above.

Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -