2013-03-21 71 views
0

Files available at: www.maharrington.co.uk/click 建立一個網站,爲我們的學生電臺 - 此代碼的工作在Firefox,但在Chrome出於某種原因不能正常工作。 我讀過以前的帖子,他們有類似的錯誤,這是由於JavaScript沒有放在頁面的頂部 - 但是,已經將所有的JavaScript移動到標題中,我不明白爲什麼仍然存在(在Chrome調試控制檯中運行)出現許多錯誤。錯誤使用jQuery - 但我不知道如何解決

<!-- the jScrollPane script --> 
      <script type="text/javascript" src="js/jquery.mousewheel.js"></script>  
      <script type="text/javascript" src="js/jquery.contentcarousel.js"></script> 
     <script type="text/javascript"> 
        $('#ca-container').contentcarousel(); 
     </script>  
     <script type="text/javascript"> 
      var aImages = [ "images/banner/banner1.jpg" , "images/banner/banner2.jpg", "images/banner/banner3.jpg", "images/banner/banner4.jpg",]; 
      var oImage = null; 
      var iIdx = 0; 

    function play(){ 
    try{ 
      //look only once in DOM and cache it 
      if(oImage===null){ 
      oImage = window.document.getElementById("imgHolder"); 
      } 
      oImage.src = aImages[(++iIdx)%(aImages.length)]; 
     setTimeout('play()',10000); 
     }catch(oEx){ 
     //some error handling here 
     } 
     } 
     </script>  
</head> 
    <body onload="play()"> 
<section id="content"> 
    <section id="headerArea"> 
     <section id="mainHeader"> 
      <section id="leftHeader"> 
       <a href="index.php"> <img src="images/clicklogowb.png" height="200px" width="330"> </a> 
      </section>   
      <section id="rightHeader"> 
       <section id="rightTop"> 
        <img src="images/header.png"> 
       </section> 
     </section> 
    <style type="text/css"> #mainContent {margin-top:-16%;} </style> 
<link href="css/presenters.css" rel="stylesheet"> 
<!-- the jScrollPane script --> 
     <script type="text/javascript" src="js/jquery.mousewheel.js"></script> 
     <script type="text/javascript" src="js/jquery.contentcarousel.js"></script> 
     <script type="text/javascript"> 
      $('#ca-container').contentcarousel(); 
     </script> 
<section id="mainContent"> 
     <section id="blocks"> 
       <section id="topBlocks"> 

    <br> 
    <h5>Presenters</h5> 
      <div id="ca-container" class="ca-container"> 
       <div class="ca-wrapper"> 
        <div class="ca-item ca-item-1"> 
         <div class="ca-item-main"> 
          <div class="ca-icon"></div> 
          <h3>Priscilla</h3> 
          <h4> 
           <span class="ca-quote">&ldquo;</span> 
           <span>The greatness of a nation and its moral progress can be judged by the way in which its animals are treated.</span> 
          </h4> 
           <a href="#" class="ca-more">more...</a> 
         </div> 
         <div class="ca-content-wrapper"> 
          <div class="ca-content"> 

           <a href="#" class="ca-close">close</a> 
           <div class="ca-content-text"> 
            <p>I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now.</p> 
            <p>When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream;</p> 
            <p>She packed her seven versalia, put her initial into the belt and made herself on the way.</p> 
           </div> 
                  </div> 
         </div> 
        </div> 
        <div class="ca-item ca-item-2"> 
         <div class="ca-item-main"> 
          <div class="ca-icon"></div> 
          <h3>Lucy</h3> 
          <h4> 
           <span class="ca-quote">&ldquo;</span> 
           <span>I hold that the more helpless a creature, the more entitled it is to protection by man from the cruelty of man.</span> 
          </h4> 
           <a href="#" class="ca-more">more...</a> 
         </div> 
         <div class="ca-content-wrapper"> 
          <div class="ca-content"> 
                  <a href="#" class="ca-close">close</a> 
           <div class="ca-content-text"> 
            <p>I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now.</p> 
            <p>When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream;</p> 
            <p>She packed her seven versalia, put her initial into the belt and made herself on the way.</p> 
           </div> 

          </div> 
         </div> 
        </div> 
        <div class="ca-item ca-item-3"> 
         <div class="ca-item-main"> 
          <div class="ca-icon"></div> 
          <h3>Nat</h3> 
          <h4> 
           <span class="ca-quote">&ldquo;</span> 
           <span>I feel that spiritual progress does demand at some stage that we should cease to kill our fellow creatures for the satisfaction of our bodily wants.</span> 
          </h4> 
           <a href="#" class="ca-more">more...</a> 
         </div> 
         <div class="ca-content-wrapper"> 
          <div class="ca-content"> 
                  <a href="#" class="ca-close">close</a> 
           <div class="ca-content-text"> 
            <p>I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now.</p> 
            <p>When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream;</p> 
            <p>She packed her seven versalia, put her initial into the belt and made herself on the way.</p> 
           </div> 
                </div> 
         </div> 
        </div> 
        <div class="ca-item ca-item-4"> 
         <div class="ca-item-main"> 
          <div class="ca-icon"></div> 
          <h3>Katya</h3> 
          <h4> 
           <span class="ca-quote">&ldquo;</span> 
           <span>A man is but the product of his thoughts what he thinks, he becomes.</span> 
          </h4> 
           <a href="#" class="ca-more">more...</a> 
         </div> 
         <div class="ca-content-wrapper"> 
          <div class="ca-content"> 
                  <a href="#" class="ca-close">close</a> 
           <div class="ca-content-text"> 
            <p>I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now.</p> 
            <p>When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream;</p> 
            <p>She packed her seven versalia, put her initial into the belt and made herself on the way.</p> 
           </div> 

          </div> 
         </div> 
        </div> 
        <div class="ca-item ca-item-5"> 
         <div class="ca-item-main"> 
          <div class="ca-icon"></div> 
          <h3>Rebecca</h3> 
          <h4> 
           <span class="ca-quote">&ldquo;</span> 
           <span>A weak man is just by accident. A strong but non-violent man is unjust by accident.</span> 
          </h4> 
           <a href="#" class="ca-more">more...</a> 
         </div> 
         <div class="ca-content-wrapper"> 
          <div class="ca-content"> 
                   <a href="#" class="ca-close">close</a> 
           <div class="ca-content-text"> 
            <p>I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now.</p> 
            <p>When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream;</p> 
            <p>She packed her seven versalia, put her initial into the belt and made herself on the way.</p> 
           </div> 

          </div> 
         </div> 
        </div> 
        <div class="ca-item ca-item-6"> 
         <div class="ca-item-main"> 
          <div class="ca-icon"></div> 
          <h3>Dan</h3> 
          <h4> 
           <span class="ca-quote">&ldquo;</span> 
           <span>An error does not become truth by reason of multiplied propagation, nor does truth become error because nobody sees it.</span> 
          </h4> 
           <a href="#" class="ca-more">more...</a> 
         </div> 
         <div class="ca-content-wrapper"> 
          <div class="ca-content"> 

           <a href="#" class="ca-close">close</a> 
           <div class="ca-content-text"> 
            <p>I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now.</p> 
            <p>When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream;</p> 
            <p>She packed her seven versalia, put her initial into the belt and made herself on the way.</p> 
           </div> 

          </div> 
         </div> 
        </div> 
        <div class="ca-item ca-item-7"> 
         <div class="ca-item-main"> 
          <div class="ca-icon"></div> 
          <h3>Rebecca</h3> 
          <h4> 
           <span class="ca-quote">&ldquo;</span> 
           <span>A small body of determined spirits fired by an unquenchable faith in their mission can alter the course of history.</span> 
          </h4> 
           <a href="#" class="ca-more">more...</a> 
         </div> 
         <div class="ca-content-wrapper"> 
          <div class="ca-content"> 

           <a href="#" class="ca-close">close</a> 
           <div class="ca-content-text"> 
            <p>I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now.</p> 
            <p>When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream;</p> 
            <p>She packed her seven versalia, put her initial into the belt and made herself on the way.</p> 
           </div> 

          </div> 
         </div> 
        </div> 
        <div class="ca-item ca-item-8"> 
         <div class="ca-item-main"> 
          <div class="ca-icon"></div> 
          <h3>Diarmuid</h3> 
          <h4> 
           <span class="ca-quote">&ldquo;</span> 
           <span>A nation's culture resides in the hearts and in the soul of its people.</span> 
          </h4> 
           <a href="#" class="ca-more">more...</a> 
         </div> 
         <div class="ca-content-wrapper"> 
          <div class="ca-content"> 
                  <a href="#" class="ca-close">close</a> 
           <div class="ca-content-text"> 
            <p>I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now.</p> 
            <p>When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream;</p> 
            <p>She packed her seven versalia, put her initial into the belt and made herself on the way.</p> 
           </div> 

          </div> 
         </div> 
        </div> 
        <div class="ca-item ca-item-9"> 
         <div class="ca-item-main"> 
          <div class="ca-icon"></div> 
          <h3>Sian</h3> 
          <h4> 
           <span class="ca-quote">&ldquo;</span> 
           <span>A nation's culture resides in the hearts and in the soul of its people.</span> 
          </h4> 
           <a href="#" class="ca-more">more...</a> 
         </div> 
         <div class="ca-content-wrapper"> 
          <div class="ca-content"> 
                  <a href="#" class="ca-close">close</a> 
           <div class="ca-content-text"> 
            <p>I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now.</p> 
            <p>When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream;</p> 
            <p>She packed her seven versalia, put her initial into the belt and made herself on the way.</p> 
           </div> 

          </div> 
         </div> 
        </div> 
        <div class="ca-item ca-item-10"> 
         <div class="ca-item-main"> 
          <div class="ca-icon"></div> 
          <h3>Etienne</h3> 
          <h4> 
           <span class="ca-quote">&ldquo;</span> 
           <span>A nation's culture resides in the hearts and in the soul of its people.</span> 
          </h4> 
           <a href="#" class="ca-more">more...</a> 
         </div> 
         <div class="ca-content-wrapper"> 
          <div class="ca-content"> 
                  <a href="#" class="ca-close">close</a> 
           <div class="ca-content-text"> 
            <p>I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now.</p> 
            <p>When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream;</p> 
            <p>She packed her seven versalia, put her initial into the belt and made herself on the way.</p> 
           </div> 

          </div> 
         </div> 
        </div> 
        <div class="ca-item ca-item-11"> 
         <div class="ca-item-main"> 
          <div class="ca-icon"></div> 
          <h3>Matthew</h3> 
          <h4> 
           <span class="ca-quote">&ldquo;</span> 
           <span>A nation's culture resides in the hearts and in the soul of its people.</span> 
          </h4> 
           <a href="#" class="ca-more">more...</a> 
         </div> 
         <div class="ca-content-wrapper"> 
          <div class="ca-content"> 
                  <a href="#" class="ca-close">close</a> 
           <div class="ca-content-text"> 
            <p>I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now.</p> 
            <p>When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream;</p> 
            <p>She packed her seven versalia, put her initial into the belt and made herself on the way.</p> 
           </div> 

          </div> 
         </div> 
        </div> 
        <div class="ca-item ca-item-12"> 
         <div class="ca-item-main"> 
          <div class="ca-icon"></div> 
          <h3>Alex</h3> 
          <h4> 
           <span class="ca-quote">&ldquo;</span> 
           <span>A nation's culture resides in the hearts and in the soul of its people.</span> 
          </h4> 
           <a href="#" class="ca-more">more...</a> 
         </div> 
         <div class="ca-content-wrapper"> 
          <div class="ca-content"> 
                  <a href="#" class="ca-close">close</a> 
           <div class="ca-content-text"> 
            <p>I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now.</p> 
            <p>When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream;</p> 
            <p>She packed her seven versalia, put her initial into the belt and made herself on the way.</p> 
           </div> 

          </div> 
         </div> 
        </div> 
        <div class="ca-item ca-item-13"> 
         <div class="ca-item-main"> 
          <div class="ca-icon"></div> 
          <h3>Jamie</h3> 
          <h4> 
           <span class="ca-quote">&ldquo;</span> 
           <span>A nation's culture resides in the hearts and in the soul of its people.</span> 
          </h4> 
           <a href="#" class="ca-more">more...</a> 
         </div> 
         <div class="ca-content-wrapper"> 
          <div class="ca-content"> 
                  <a href="#" class="ca-close">close</a> 
           <div class="ca-content-text"> 
            <p>I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now.</p> 
            <p>When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream;</p> 
            <p>She packed her seven versalia, put her initial into the belt and made herself on the way.</p> 
           </div> 

          </div> 
         </div> 
        </div> 
        <div class="ca-item ca-item-14"> 
         <div class="ca-item-main"> 
          <div class="ca-icon"></div> 
          <h3>Matt</h3> 
          <h4> 
           <span class="ca-quote">&ldquo;</span> 
           <span>A nation's culture resides in the hearts and in the soul of its people.</span> 
          </h4> 
           <a href="#" class="ca-more">more...</a> 
         </div> 
         <div class="ca-content-wrapper"> 
          <div class="ca-content"> 
                  <a href="#" class="ca-close">close</a> 
           <div class="ca-content-text"> 
            <p>I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now.</p> 
            <p>When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream;</p> 
            <p>She packed her seven versalia, put her initial into the belt and made herself on the way.</p> 
           </div> 

          </div> 
         </div> 
        </div> 
        <div class="ca-item ca-item-15"> 
         <div class="ca-item-main"> 
          <div class="ca-icon"></div> 
          <h3>Sam</h3> 
          <h4> 
           <span class="ca-quote">&ldquo;</span> 
           <span>A nation's culture resides in the hearts and in the soul of its people.</span> 
          </h4> 
           <a href="#" class="ca-more">more...</a> 
         </div> 
         <div class="ca-content-wrapper"> 
          <div class="ca-content"> 
                  <a href="#" class="ca-close">close</a> 
           <div class="ca-content-text"> 
            <p>I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now.</p> 
            <p>When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream;</p> 
            <p>She packed her seven versalia, put her initial into the belt and made herself on the way.</p> 
           </div> 

          </div> 
         </div> 
        </div> 
        <div class="ca-item ca-item-16"> 
         <div class="ca-item-main"> 
          <div class="ca-icon"></div> 
          <h3>Stefan</h3> 
          <h4> 
           <span class="ca-quote">&ldquo;</span> 
           <span>A nation's culture resides in the hearts and in the soul of its people.</span> 
          </h4> 
           <a href="#" class="ca-more">more...</a> 
         </div> 
         <div class="ca-content-wrapper"> 
          <div class="ca-content"> 
                  <a href="#" class="ca-close">close</a> 
           <div class="ca-content-text"> 
            <p>I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now.</p> 
            <p>When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream;</p> 
            <p>She packed her seven versalia, put her initial into the belt and made herself on the way.</p> 
           </div> 

          </div> 
         </div> 
        </div> 
        <div class="ca-item ca-item-17"> 
         <div class="ca-item-main"> 
          <div class="ca-icon"></div> 
          <h3>George</h3> 
          <h4> 
           <span class="ca-quote">&ldquo;</span> 
           <span>A nation's culture resides in the hearts and in the soul of its people.</span> 
          </h4> 
           <a href="#" class="ca-more">more...</a> 
         </div> 
         <div class="ca-content-wrapper"> 
          <div class="ca-content"> 
                  <a href="#" class="ca-close">close</a> 
           <div class="ca-content-text"> 
            <p>I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now.</p> 
            <p>When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream;</p> 
            <p>She packed her seven versalia, put her initial into the belt and made herself on the way.</p> 
           </div> 

          </div> 
         </div> 
        </div> 
        </div> 
       </div> 

我可以通過電子郵件/其他方式提供的代碼文件,如果是您更容易查看?


下面是錯誤:

Uncaught ReferenceError: jQuery is not defined jquery.mousewheel.js:78 
Uncaught ReferenceError: jQuery is not defined jquery.contentcarousel.js:257 
Uncaught ReferenceError: $ is not defined shows.php:34 
[blocked] The page at scm-intranet.tees.ac.uk/users/l1009357/click_new/shows.php ran insecure content from ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js 
Uncaught ReferenceError: jQuery is not defined jquery.easing.1.3.js:39 
Uncaught ReferenceError: jQuery is not defined jquery.mousewheel.js:78 
Uncaught ReferenceError: jQuery is not defined jquery.contentcarousel.js:257 
Uncaught ReferenceError: $ is not defined shows.php:267 
+1

如下所示引用的jQuery的代碼行外,還是可能的,你忘了,包括它的任何其他腳本之前? – Ben 2013-03-21 12:50:11

+2

什麼壞了? – 2013-03-21 12:50:37

+0

錯誤說的是什麼? – 2013-03-21 12:51:51

回答

0

試試這個,也許它的工作:

$(document).ready(function(){ 
    $('#ca-container').contentcarousel(); 
});  

呼叫compeletly加載

,你也需要在contentcarousel()窗口後,包括jQuery的前另一個js庫:

<script type="text/javascript" src="js/jquery.js"></script> 
1

你提到的問題出現在你的jQuery代碼中。唯一的jQuery的電話我看到的是這一個:

$('#ca-container').contentcarousel(); 

如果不能正常工作,有一個很好的機會,那是因爲你需要等待來執行,直到文檔加載:

$(document).on('ready', function() { 
    $('#ca-container').contentcarousel(); 
}); 

否則,在執行jQuery代碼時,ca-container元素不存在。


UPDATE:

你也忘記包括在<head> jQuery庫。

0

從身體移動的傳送帶jQuery代碼的頭部元素,並調用它的的document.ready事件,還包括對jQuery庫本身的引用:

<head> 
<script src="http://code.jquery.com/jquery-latest.min.js" 
    type="text/javascript"></script> 
<style type="text/css"> #mainContent {margin-top:-16%;} </style> 
<link href="css/presenters.css" rel="stylesheet"> 
<!-- the jScrollPane script --> 
     <script type="text/javascript" src="js/jquery.mousewheel.js"></script> 

      <script type="text/javascript" src="js/jquery.contentcarousel.js"></script> 
     <script type="text/javascript"> 
        $(document).ready(function(){ 
         $('#ca-container').contentcarousel(); 
        }); 
     </script>  
     <script type="text/javascript"> 
      var aImages = [ "images/banner/banner1.jpg" , "images/banner/banner2.jpg", "images/banner/banner3.jpg", "images/banner/banner4.jpg",]; 
      var oImage = null; 
      var iIdx = 0; 

    function play(){ 
    try{ 
      //look only once in DOM and cache it 
      if(oImage===null){ 
      oImage = window.document.getElementById("imgHolder"); 
      } 
      oImage.src = aImages[(++iIdx)%(aImages.length)]; 
     setTimeout('play()',10000); 
     }catch(oEx){ 
     //some error handling here 
     } 
     } 
     </script> 



</head> 
    <body onload="play()"> 
<section id="content"> 
    <section id="headerArea"> 
     <section id="mainHeader"> 
      <section id="leftHeader"> 
       <a href="index.php"> <img src="images/clicklogowb.png" height="200px" width="330"> </a> 
      </section>   
      <section id="rightHeader"> 
       <section id="rightTop"> 
        <img src="images/header.png"> 
       </section> 
     </section> 

<section id="mainContent"> 
     <section id="blocks"> 
       <section id="topBlocks"> 

    <br> 
    <h5>Presenters</h5> 
      <div id="ca-container" class="ca-container"> 
       <div class="ca-wrapper"> 
        <div class="ca-item ca-item-1"> 
         <div class="ca-item-main"> 
          <div class="ca-icon"></div> 
          <h3>Priscilla</h3> 
          <h4> 
           <span class="ca-quote">&ldquo;</span> 
           <span>The greatness of a nation and its moral progress can be judged by the way in which its animals are treated.</span> 
          </h4> 
           <a href="#" class="ca-more">more...</a> 
         </div> 
         <div class="ca-content-wrapper"> 
          <div class="ca-content"> 

           <a href="#" class="ca-close">close</a> 
           <div class="ca-content-text"> 
            <p>I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now.</p> 
            <p>When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream;</p> 
            <p>She packed her seven versalia, put her initial into the belt and made herself on the way.</p> 
           </div> 
                  </div> 
         </div> 
        </div> 
        <div class="ca-item ca-item-2"> 
         <div class="ca-item-main"> 
          <div class="ca-icon"></div> 
          <h3>Lucy</h3> 
          <h4> 
           <span class="ca-quote">&ldquo;</span> 
           <span>I hold that the more helpless a creature, the more entitled it is to protection by man from the cruelty of man.</span> 
          </h4> 
           <a href="#" class="ca-more">more...</a> 
         </div> 
         <div class="ca-content-wrapper"> 
          <div class="ca-content"> 
                  <a href="#" class="ca-close">close</a> 
           <div class="ca-content-text"> 
            <p>I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now.</p> 
            <p>When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream;</p> 
            <p>She packed her seven versalia, put her initial into the belt and made herself on the way.</p> 
           </div> 

          </div> 
         </div> 
        </div> 
        <div class="ca-item ca-item-3"> 
         <div class="ca-item-main"> 
          <div class="ca-icon"></div> 
          <h3>Nat</h3> 
          <h4> 
           <span class="ca-quote">&ldquo;</span> 
           <span>I feel that spiritual progress does demand at some stage that we should cease to kill our fellow creatures for the satisfaction of our bodily wants.</span> 
          </h4> 
           <a href="#" class="ca-more">more...</a> 
         </div> 
         <div class="ca-content-wrapper"> 
          <div class="ca-content"> 
                  <a href="#" class="ca-close">close</a> 
           <div class="ca-content-text"> 
            <p>I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now.</p> 
            <p>When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream;</p> 
            <p>She packed her seven versalia, put her initial into the belt and made herself on the way.</p> 
           </div> 
                </div> 
         </div> 
        </div> 
        <div class="ca-item ca-item-4"> 
         <div class="ca-item-main"> 
          <div class="ca-icon"></div> 
          <h3>Katya</h3> 
          <h4> 
           <span class="ca-quote">&ldquo;</span> 
           <span>A man is but the product of his thoughts what he thinks, he becomes.</span> 
          </h4> 
           <a href="#" class="ca-more">more...</a> 
         </div> 
         <div class="ca-content-wrapper"> 
          <div class="ca-content"> 
                  <a href="#" class="ca-close">close</a> 
           <div class="ca-content-text"> 
            <p>I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now.</p> 
            <p>When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream;</p> 
            <p>She packed her seven versalia, put her initial into the belt and made herself on the way.</p> 
           </div> 

          </div> 
         </div> 
        </div> 
        <div class="ca-item ca-item-5"> 
         <div class="ca-item-main"> 
          <div class="ca-icon"></div> 
          <h3>Rebecca</h3> 
          <h4> 
           <span class="ca-quote">&ldquo;</span> 
           <span>A weak man is just by accident. A strong but non-violent man is unjust by accident.</span> 
          </h4> 
           <a href="#" class="ca-more">more...</a> 
         </div> 
         <div class="ca-content-wrapper"> 
          <div class="ca-content"> 
                   <a href="#" class="ca-close">close</a> 
           <div class="ca-content-text"> 
            <p>I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now.</p> 
            <p>When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream;</p> 
            <p>She packed her seven versalia, put her initial into the belt and made herself on the way.</p> 
           </div> 

          </div> 
         </div> 
        </div> 
        <div class="ca-item ca-item-6"> 
         <div class="ca-item-main"> 
          <div class="ca-icon"></div> 
          <h3>Dan</h3> 
          <h4> 
           <span class="ca-quote">&ldquo;</span> 
           <span>An error does not become truth by reason of multiplied propagation, nor does truth become error because nobody sees it.</span> 
          </h4> 
           <a href="#" class="ca-more">more...</a> 
         </div> 
         <div class="ca-content-wrapper"> 
          <div class="ca-content"> 

           <a href="#" class="ca-close">close</a> 
           <div class="ca-content-text"> 
            <p>I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now.</p> 
        ---------------- TRUNCATED 
+0

這並不遺憾的是工作 – 2013-03-21 13:04:26

+0

此評論並不能幫助我在幫助你。你得到了什麼錯誤? – Seany84 2013-03-21 15:31:29

0

你得到什麼錯誤?

你忘記了將jquery包含在代碼片段中嗎?

您在頁面中包含了以下腳本兩次(頭部和身體)。

<script type="text/javascript" src="js/jquery.mousewheel.js"></script>  
<script type="text/javascript" src="js/jquery.contentcarousel.js"></script> 

這可能是問題所在,並確保你的document.ready添加插件代碼。

0

您收到錯誤Uncaught ReferenceError: jQuery is not defined

確保您已引用jQuery的任何其他腳本之前..你甚至包含的jquery.js?

嘗試增加這頭部分,您包括

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>