2011-12-01 37 views
1

我收到此错误:对象的翻译:有没有方法“calendricalDate”

Uncaught TypeError: Object [object Object] has no method 'calendricalDate' 

我试图用这个plugin。奇怪的是,它一直在工作,只是突然停止。 这里是jQuery代码:

<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js' type='text/javascript'></script> 
<script src="../js/jquery.calendrical.js"></script> 
<script> 
    $(function() { 
     $('#salida, #llegada').calendricalDate(); 
     $('#salida_time, #llegada_time').calendricalTime(); 
    }); 
</script> 

而且js文件是完全从网站一样,我只是复制和粘贴。这可能是我可能忽视的真正愚蠢的东西,所以任何帮助都不值得赞赏。 这里有更详细的错误:

14Uncaught TypeError: Object [object Object] has no method 'calendricalDate' 
(anonymous function)    enviotracking.php:14 
o.extend.ready.o.readyList  jquery-1.3.2.min.js:19 
o.extend.each      jquery-1.3.2.min.js:12 
o.extend.ready     jquery-1.3.2.min.js:19 
o.each.o.fn.(anonymous function) 

在php文件行14 DOCTYPE HTML PUBLIC “ - // W3C // DTD XHTML 1.0过渡// EN”“http://www.w3.org/TR /xhtml1/DTD/xhtml1-transitional.dtd“>

好吧,这很奇怪我有另一个页面具有相同的代码,它的工作原理,但我做了错误发生的时间,所以我把所有东西都拿出来,并开始添加我的代码1 1,我注意到当我添加此:

<script src="../js/jquery-1.6.1.min.js" type="text/javascript"></script> 
<script type="text/javascript"> 
    $(document).ready(function(){ 

     $("ul.subnav").parent().append("<span></span>"); //Only shows drop down trigger when js is enabled (Adds empty span tag after ul.subnav*) 

     $("ul.topnav li span").click(function() { //When trigger is clicked... 

      //Following events are applied to the subnav itself (moving subnav up and down) 
      $(this).parent().find("ul.subnav").slideDown('fast').show(); //Drop down the subnav on click 

      $(this).parent().hover(function() { 
      }, function(){ 
       $(this).parent().find("ul.subnav").slideUp('slow'); //When the mouse hovers out of the subnav, move it back up 
      }); 

      //Following events are applied to the trigger (Hover events for the trigger) 
      }).hover(function() { 
       $(this).addClass("subhover"); //On hover over, add class "subhover" 
      }, function(){ //On Hover Out 
       $(this).removeClass("subhover"); //On hover out, remove class "subhover" 
     }); 

    }); 
</script> 

是当我的代码中断。但是,这并不在其他地方发生:(

+0

检查萤火虫控制台的任何javascript错误 – Rafay

+0

你确定jQuery版本,因为在'考试中的插件网站ple.html'有'版本1.4.2'的jquery使用 – Rafay

+0

我试过了,以及1.4.2和同样的错误。 @铬的3nigma多数民众赞成在我假设萤火虫的确切错误讯息将是相同的? – Andres

回答

2

要关闭这个功能我想通了,这是不是又是一个jQuery脚本路径这是导致冲突。我甚至不需要它,删除额外的脚本后,一切正常。感谢大家的努力!

0

申请单独工作:

试试这个:

$('#salida').calendricalDate(); 
$('#llegada').calendricalDate(); 
+0

忘记这一点,它仍然清晨,它也可以工作:[jsfiddle](http://jsfiddle.net/didierg/d6EsR/) –

相关问题