2011-04-03 45 views
0

嗨 我已經創建了一個使用ical的web應用程序。當我在本地運行它時,它就像一個魅力。但是,當我通過ftp將它上傳到我的服務器以便在線測試時,該腳本不會顯示出來。 我的Safari瀏覽器給我一個錯誤---> TypeError:表達式結果'$('#any_id')。getCalendar'[undefined]不是函數。 這是我的代碼:ical jqtouch擴展工作完美的地方,但甚至不顯示在線

<style type="text/css" media="screen">@import "jqtouch/jqtouch.css";</style> 
    <style type="text/css" media="screen">@import "themes/artspot/theme.css";</style> 
    <style type="text/css" media="screen">@import "jqt.calendar.css";</style> 
    <script src="jqtouch/jquery-1.4.2.min.js" type="text/javascript" charset="utf-8"></script> 
    <script src="jqtouch/jqtouch.js" type="application/x-javascript" charset="utf-8"></script> 
    <script src="extensions/jqt.calendar/jqt.calendar.js" type="application/x-javascript" charset="utf-8"></script> 
    <style type="text/css" media="screen">@import "../../extensions/jqt.listIndex/jqt.listIndex.css";</style> 
    <script src="../../jqtouch/jquery-1.4.2.js" type="text/javascript" charset="utf-8"></script> 
    <script src="../../jqtouch/jqtouch.js" type="application/x-javascript" charset="utf-8"></script> 
    <script src="../../extensions/jqt.autotitles.js" type="application/x-javascript" charset="utf-8"></script> 
    <script src="../../extensions/jqt.listIndex/jqt.listIndex.js" type="application/x-javascript" charset="utf-8"></script> 
    <script type="text/javascript" charset="utf-8"> 
    var jQT = new $.jQTouch({}); 
    $(function() { 
     $('#any_id').getCalendar(); 
    }); 
    </script> 
    <style type="text/css" media="screen"> 
    </style> 
</head> 
<body> 
    <div id="jqt"> 
     <div id="home" class="current"> 
      <div class="toolbar"> 
       <h1>Calendar</h1> 
      </div> 
      <div id="any_id"> 
       <ul> 
       <li><time datetime="2011-01-26T14:30Z">210 mg/dl</time></li> 
       <li><time datetime="2011-01-26T14:30Z">100 mg/dl</time></li> 
       </ul> 
      </div> 
     </div> 
    </div> 
</body> 

我的問題的Web應用程序是--->web app ical

回答

0
Error: $("#any_id").getCalendar is not a function 
Source File: http://webstore.web44.net/ 
Line: 20 

您正在加載兩遍

<script src="jqtouch/jquery-1.4.2.min.js" type="text/javascript" charset="utf-8"></script> 
<script src="jqtouch/jqtouch.js" type="application/x-javascript" charset="utf-8"></script> 

<script src="../../jqtouch/jquery-1.4.2.js" type="text/javascript" charset="utf-8"></script> 
<script src="../../jqtouch/jqtouch.js" type="application/x-javascript" charset="utf-8"></script> 
+0

您需要刪除加載jquery和jqtouch的兩組行之一 - 這將是一個好開始 – mplungjan 2011-04-03 19:16:31

+0

是的,這是問題,謝謝** mplungjan ** – 2011-04-03 19:32:17

相關問題