tags:

views:

61

answers:

3

During development, I use this to load the latest jQuery:

<script src="http://www.google.com/jsapi"&gt;&lt;/script&gt;
<script type="text/javascript">
google.load("jquery", "1");
</script>

But during development, I'd like to use the non-minified version.

+1  A: 

During development, why not host it yourself and then move to the Google-hosted minified jQuery?

After all, the impetus for using Google is to reduce initial-load latency for jQuery and during development that isn't really an issue.

Xorlev
I use non-minified version from Google in development simply because it's easier - I don't have to worry about having a copy on my server and makes switching to a minified version easier (but only ever so slightly) once I'm ready to go live
Marek Karbarz
+1  A: 

This should do it

google.load("jquery", "1", {uncompressed:true});
Marek Karbarz
+2  A: 

You could simply include

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"&gt;&lt;/script&gt;

Alternatively, you can add the uncompressed parameter:

google.load("jquery", "1", { uncompressed: true });

You can even switch automatically:

google.load("jquery", "1", { uncompressed: location.host === "dev.yourdomain.com" });
SLaks