I'm using jQuery cycle to create a few galleries and everything is great, locally. However on the sever I get these two error messages:
Uncaught SyntaxError: Unexpected end of input jquery-cycle.js:1
Uncaught TypeError: Object [object Object] has no method 'cycle
Including jQuery and Cycle:
<script src="<?php bloginfo('template_url'); ?>/js/jquery-latest.js" type="text/javascript"></script>
<script src="<?php bloginfo('template_url'); ?>/js/jquery-cycle.js" type="text/javascript"></script>
My jQuery Cycle function:
<script>
$(function() {
$('#mini-gallery').cycle({
speed: 800,
timeout: '6500',
pause: 'true',
cleartypeNoBg: 'false',
containerResize:0,
slideExpr: '.testimonial-mini-item'
});
});
</script>
Why am I getting these error messages on the live server?
UPDATE
I've changed the way I load the Cycle plugin to this:
<script src="http://malsup.github.io/jquery.cycle.all.js"></script>
Now the plugin works great. Any ideas why this works now? Would this have anything to do with the fact that my I'm using a server IP address and not a domain?
I would double check to make sure your jquery-cycle.js
file doesn't have a missing bracket or something in there that causes the page to fail while loading it.