doushang8846 2013-08-12 16:53
浏览 53
已采纳

jQuery Cycle Uncaught SyntaxError:意外的输入结束

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?

  • 写回答

2条回答 默认 最新

  • doulian7305 2013-08-12 17:02
    关注

    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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 Python中knn问题
  • ¥15 使用C#,asp.net读取Excel文件并保存到Oracle数据库
  • ¥15 C# datagridview 单元格显示进度及值
  • ¥15 thinkphp6配合social login单点登录问题
  • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 虚心请教几个问题,小生先有礼了