2014-05-19 3 views
0

아코디언이 작동하지 않습니다. 그것은 정상적으로 작동했지만 최근에 중단되었습니다. 나는 구글의 jQuery UI와 함께 정확한 js 파일을 소싱하고 있는지 확인했다. 내가 뭘 잘못하고 있는지 알 겠어?jQuery 아코디언이 작동하지 않는 이유는 무엇입니까?

http://www.writtenhandshake.com/servicesa.html

자바 스크립트 코드는 다음과 같습니다

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> 
<script type="text/javascript" src="/files/theme/jquery.easing.1.3.js"></script> 
<script type="text/javascript" src="/files/theme/AccordionVA-jquery.mousewheel.js"></script> 
<script type="text/javascript" src="/files/theme/AccordionVA-jquery.vaccordion.js"></script> 
<script type="text/javascript"> 
     $(function() { 
      $('#va-accordion').vaccordion(); 
     }); 
</script> 

HTML 코드는 다음과 같습니다

<div id="va-accordion" class="va-container"> 
    <div class="va-nav"> 
     <span class="va-nav-prev">Previous</span> 
     <span class="va-nav-next">Next</span> 
</div> 
<div class="va-wrapper"> 
    <div class="va-slice va-slice-1"> 
     <h3 class="va-title">Contracts</h3> 
     <div class="va-content"> 
      <p><span style="color:white; background:rgb(0,0,0); background: rgba(0, 0, 0, 0.2); padding: 4px;">As our most popular service, we have negotiated a wide range of contracts, including: book deals, employment agreements, property management agreements, landlord/tenant leases, and more.</span></p> 
      <ul> 
       <li><a href="http://www.writtenhandshake.com/portfolio.html">Portfolio</a></li> 
       <li><a href="http://www.writtenhandshake.com/contact.html">Contact</a></li> 
      </ul> 
     </div> 
    </div> 
    <div class="va-slice va-slice-2"> 
        <h3 class="va-title">Business Services</h3> 
        <div class="va-content"> 
         <p><span style="color:white; background:rgb(0,0,0); background: rgba(0, 0, 0, 0.7); padding: 4px;">We are passionate about helping young businesses get off the ground. We have helped with all stages of business development, from protecting business proposals, to incorporating new companies, to drafting company policies.</span></p> 
         <ul> 
          <li><a href="http://www.writtenhandshake.com/portfolio.html">Portfolio</a></li> 
          <li><a href="http://www.writtenhandshake.com/contact.html">Contact</a></li> 
         </ul> 
        </div> 
       </div> 
        <div class="va-slice va-slice-3"> 
        <h3 class="va-title">Demand Letters</h3> 
        <div class="va-content"> 
         <p><span style="color:white; background:rgb(0,0,0); background: rgba(0, 0, 0, 0.2); padding: 4px;">Have one of our attorneys write a demand letter on your behalf. Often receiving a letter from an attorney is it all it takes to show you are serious.</span></p> 
         <ul> 
          <li><a href="http://www.writtenhandshake.com/portfolio.html">Portfolio</a></li> 
          <li><a href="http://www.writtenhandshake.com/contact.html">Contact</a></li> 
         </ul> 
        </div> 
       </div> 
            <div class="va-slice va-slice-4"> 
        <h3 class="va-title">Wills</h3> 
        <div class="va-content"> 
         <p><span style="color:white; background:rgb(0,0,0); background: rgba(0, 0, 0, 0.2); padding: 4px;">We can draft your will for you at an affordable price.</span></p> 
         <ul> 
          <li><a href="http://www.writtenhandshake.com/portfolio.html">Portfolio</a></li> 
          <li><a href="http://www.writtenhandshake.com/contact.html">Contact</a></li> 
         </ul> 
        </div> 
       </div> 
       <div class="va-slice va-slice-5"> 
        <h3 class="va-title">Attorney Packages</h3> 
        <div class="va-content"> 
         <p><span style="color:white; background:rgb(0,0,0); background: rgba(0, 0, 0, 0.7); padding: 4px;">We understand that every case is unique and we are happy to provide more extensive solutions. Our "Attorney Package" gives you access to an attorney every step of the way, including attorney-drafted documents with step-by-step attorney guidance.</span></p> 
         <ul> 
          <li><a href="http://www.writtenhandshake.com/portfolio.html">Portfolio</a></li> 
          <li><a href="http://www.writtenhandshake.com/contact.html">Contact</a></li> 
         </ul> 
        </div> 
       </div> 



</div> 
</div> 

아무것도 아코디언가 작동 할 때의 JS 파일에 대한 변경되었습니다. 당신의 도움을 주셔서 대단히 감사합니다!

+0

분명히 문서에 있으며 제대로 연결되어 있습니다. – isherwood

답변

0

뭔가가 jQuery 네임 스페이스를 납치합니다. 이 시도 :

jQuery(function($) { 
    $('#va-accordion').vaccordion(); 
}); 
+0

"Something"무엇입니까? 그것은 문서에서 명확하게 볼 수 있습니다. – Popnoodles

3

변경 :

$(function() { 
    $('#va-accordion').vaccordion(); 
}); 

사람 : 문제는 두 번 jQuery를 당신의 포함에서 발생되는

jQuery(document).ready(function($) { 
    $('#va-accordion').vaccordion(); 
}); 

. 페이지의 소스를 보면 v1.11.1은 13 행, v1.7.2는 78 행에 포함됩니다. 위 버전 중 하나를 제거하거나 위의 솔루션을 사용해야합니다.

관련 문제