Wednesday, January 27, 2010

Re: [jQuery] google.load(jquery) and jquery plugins

Use google.setOnLoadCallback to add whatever plugins you need using
jQuery's $.getScript function like this:

google.load("jquery", "1");
google.setOnLoadCallback(function() {

$.getScript("http://inlinemultiselect.googlecode.com/files/jquery.inlinemultiselect-1.2.min.js",
function(){
$('select.normal').inlinemultiselect();
});
});


on 26/01/2010 19:04 barton said::
> When I try to use google.load to load jquery I have problems loading
> other jquery plugins. Somehow I need to be able to wait for jquery to
> be loaded by the google Ajax api before doing the <script type="text/
> javascript" src="thePluginThatNeedsJquery"></script>
> I know that google has google.setOnLoadCallback(function() {
> but how do I do the <script stuff inside that?
>
> The answer must be pretty obvious as I couldn't find anything when I
> searched the group but I don't see it.
>
> Thanks
>

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate