load jquery from google api

110 views
Skip to first unread message

ond

unread,
Mar 31, 2011, 6:52:41 AM3/31/11
to sfJqueryReloadedPlugin
Hey guys...

I have a question about this amazing plugin ;-)
Is it possible to set the plugin in order it loads the jquery file
from google apis ( http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js
) ?

currently my call to jquery on google is in my layout, it works but
the problem is that jquery is loaded twice ! .( with the use of ' <?
php use_helper('jQuery') ?>' .


thanx

Tom Boutell

unread,
Mar 31, 2011, 8:04:04 AM3/31/11
to sfjqueryrel...@googlegroups.com
See this existing code:

if (!$jq_path = sfConfig::get('sf_jquery_path'))
{
$jq_path = sfConfig::get('sf_jquery_web_dir', '/sfJqueryReloadedPlugin') .
'/js/' . sfConfig::get('sf_jquery_core', 'jquery-1.4.2.min.js');
}
sfContext::getInstance()->getResponse()->addJavascript($jq_path, 'first');

According to this code you should be able to set jquery_path in
settings.yml to point to it on Google.

--
Tom Boutell
P'unk Avenue
215 755 1330
punkave.com
window.punkave.com

ond

unread,
Mar 31, 2011, 9:33:04 AM3/31/11
to sfJqueryReloadedPlugin
Thanx it works fine !

On 31 mar, 14:04, Tom Boutell <t...@punkave.com> wrote:
> See this existing code:
>
> if (!$jq_path = sfConfig::get('sf_jquery_path'))
> {
>   $jq_path = sfConfig::get('sf_jquery_web_dir', '/sfJqueryReloadedPlugin') .
>     '/js/' . sfConfig::get('sf_jquery_core', 'jquery-1.4.2.min.js');}
>
> sfContext::getInstance()->getResponse()->addJavascript($jq_path, 'first');
>
> According to this code you should be able to set jquery_path in
> settings.yml to point to it on Google.
>
>
>
>
>
>
>
>
>
> On Thu, Mar 31, 2011 at 6:52 AM, ond <ousmane.n...@gmail.com> wrote:
> > Hey guys...
>
> > I have a question about this amazing plugin ;-)
> > Is it possible to set the plugin in order it loads the jquery file
> > from google apis (http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js

ond

unread,
Apr 3, 2011, 1:21:31 PM4/3/11
to sfJqueryReloadedPlugin
Is it possible to load jquery_ui from google too ?
I tried to modify the entry 'jquery_ui:' in settings.yml but without
success...

ond

unread,
Apr 6, 2011, 6:32:44 AM4/6/11
to sfJqueryReloadedPlugin
please, is anybody can tell me how to load jquery_ui from google 's
CDN ?

I tried : jquery_plugin_paths: https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.min.js

but it doesn't work ! :-(

ond

unread,
Apr 6, 2011, 6:42:29 AM4/6/11
to sfJqueryReloadedPlugin
I think that I found how to :-)

jquery_plugin_paths:
sortable : https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.min.js
Reply all
Reply to author
Forward
0 new messages