Is this non minified version of jQuery up on Google?
During development, I use this to load the latest jQuery:
<script src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("jquery", "1");
</script>
But dur开发者_如何学Pythoning development, I'd like to use the non-minified version.
This should do it
google.load("jquery", "1", {uncompressed:true});
You could simply include
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
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" });
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.
精彩评论