[wp-hackers] problem loading jquery with wp_enqueue_script

Brian Fidler fidler.brian at gmail.com
Sat May 15 20:24:17 UTC 2010


Nevermind, I got it loading.

On Sat, May 15, 2010 at 10:54 AM, Brian Fidler <fidler.brian at gmail.com>wrote:

> I'm trying to load jquery and some other jquery scripts but nothing is
> loading. The following code is in my functions.php file.
>
> /* CODE START */
> function init_jquery() {
>  if (!is_admin()) {
>  // comment out the next two lines to load the local copy of jQuery
> wp_deregister_script('jquery');
>  wp_register_script('jquery', '
> http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js', false,
> '1.4');
>  wp_enqueue_script('jquery');
>  //register Galleria
>  wp_enqueue_script('jquery-galleria',
> THEME_TEMPLATEURL.'/js/galleria/galleria.js', array('jquery'), '1.0');
>  //register Galleria Theme
> wp_enqueue_script('jquery-galleria-theme',
> THEME_TEMPLATEURL.'/js/galleria/classic/galleria.classic.js',
> array('jquery'), '1.0');
>  //register Galleria Custom Script
> wp_enqueue_script('jquery-galleria-custom',
> THEME_TEMPLATEURL.'/js/galleria/classic/db-galleria.js', array('jquery'),
> '1.0');
>
> }
> }
>
> add_action('init', 'init_jquery');
>
> /* CODE END */
>
>
> What am I doing wrong?
>


More information about the wp-hackers mailing list