Javascript undefined method
-
I’m having an issue with jquery plugins. I can verify that the .js files are being included properly, but I’m getting an undefined method error.
Here is my header:
wp_enqueue_script('jquery'); wp_enqueue_script('orbit', get_bloginfo('template_url') . '/public/assets/orbit/jquery.orbit.min.js', array('jquery')); get_header();
and I call the orbit slider:
<script> jQuery(document).ready(function(){ jQuery('#slider').orbit(); }); </script>
I know the code in the orbit.js file is being executed because I put alerts in it and saw them.
If I run the minified orbit.js code in the browser console and then call orbit on my slider element, it works.
I created a slideshow with orbit outside of wordpress and had no issues.
Thanks for any help!
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Javascript undefined method’ is closed to new replies.