This feels like it should be pretty simple, but not much seems to be loading.
I have this in my app/views/layouts/application.html.haml
:
= javascript_include_tag 'http://www.google.com/jsapi'
%script{ :type => "text/javascript", :charset => "utf-8" }
//<![CDATA[
google.load("jquery", "1.3.2");
google.load("jqueryui", "1.7.2");
//]]>
= javascript_include_tag 'application'
... where my application.js
file contains some good 'ole jQuery. I have installed JRails and my jQuery works fine with local copies of the libraries, but I want to use the ones from Goolge API.
Here's what my browser generates:
<script src="http://www.google.com/jsapi.js" type="text/javascript"></script>
<script charset='utf-8' type='text/javascript'>
<!-- /<![CDATA[ -->
google.load("jquery", "1.3.2");
google.load("jqueryui", "1.7.2");
<!-- /]]> -->
</script>
<script src="/javascripts/application.js?1255040651" type="text/javascript"></script>
I'm using Safari and the Error Console, which reports the following errors:
ReferenceError: Can't find variable: google
ReferenceError: Can't find variable: $
Correspondingly, none of my jQuery scripts are working.
Help?