Galleria In WordPress- $ is not a function...

  • Question
  • Updated 4 years ago
Anyone have this running in WordPress? I am have enqueued the script with this code:

function add_scripts(){
// Load Galleria

wp_register_script('galleria',get_bloginfo('wpurl').'/galleria/galleria-1.2.2.min.js',array('jquery'),false);
wp_enqueue_script('galleria');
}
add_action('init','add_scripts');

In the post body I have the following, but all I get is the list of images:
< script >
Galleria.loadTheme('galleria/themes/classic/galleria.classic.min.js');
$("#gallery").galleria({
width: 500,
height: 500
});
< /script >


The error I receive is this: $ is not a function ... so the galleria script isn't firing right, or in the right order..
Photo of stefan.trifonovS

stefan.trifonov

  • 5 Posts
  • 0 Likes
  • anxious

Posted 4 years ago

  • 1
Photo of stefan.trifonovS

stefan.trifonov

  • 5 Posts
  • 0 Likes