[jQuery] where to load init function with google?
Hello, I was just adding a dropdown menu to my site using droppy.
http://plugins.jquery.com/project/droppy
And I also use google jdev with google.load('jquery',...).
Droppy requires a bit of code to initialize the dropdown:
$(document).ready(function() {
$('#nav').droppy();
});
Now where should that code go when I'm using google.load() ... this is
the solution I came up with:
...
<script language="Javascript" type="text/javascript">
google.load("jquery", "1.3.1");
</script>
<script src="/media/js/jquery.droppy.js" type="text/javascript"></
script>
<script language="Javascript" type="text/javascript">
$(document).ready(function() {
$('#nav').droppy();
});
</script>
...
Is this perfectly normal? Seems like since I'm doing google.load() I
should have a callback or something.
Just wondering ... thanks!
--
Milan