2011-12-01 43 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/) –

相關問題