2013-03-21 103 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>

相关问题