You could make a script that dynamically loads jquery if it isnt
loaded yet. You'd probably lose some older browser support, and you'd
have to write the loader without jquery. Something like this:

if (!jQuery) {
 var script = document.createElement('script');
 script.type = 'text/javascript';
 script.src = 'http://jquery.com/src/jquery-latest.pack.js';
 document.getElementsByTagName('head')[0].appendChild(script);
}

I'm not sure if you can just add your own script after this, or if
you'd also have to dynamically load it.

On 5/6/07, Banta <[EMAIL PROTECTED]> wrote:

Hi,
 I'm working on a calendar widget and want to make it possible for
people to embed it on their websites...

My goal is to keep the embed line as simple as possible, something
along these lines:

<script src="www.mywebserver.com/webservices/?
userid=123&style=123&etc=123" />

Now, my question is: How do i do this in the best possible way if i
want to use Jquery.
Seeing as most Jquery scripts usually have at least 2 lines: 1 for
jquery, 1 for a plugin, how do i get this down to 1 line ?

It seems people have been using the document.write("<script src=".."><
\/script>") method alot.
But is that really the best way to do it ? And how browser compatible
is that solution anyway ?

- Regards,
 Banta.


Reply via email to