Answer the question
In order to leave comments, you need to log in
javascript dynamic connection
Please tell me if it is possible to do something like this:
You need to connect a remote script, for example
<script type="text/javascript" src="//remotehost1.com/script.js"></script>
<script type="text/javascript" src="//remotehost2.com/script.js"></script>
Answer the question
In order to leave comments, you need to log in
The guys from Zeptolab have written a nice resource loader, this is probably what you need thinkpixellab.com/pxloader/
There is also a variant from html5 boilerplate .
<!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if offline -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/libs/jquery-1.7.1.min.js"><\/script>')</script>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question