user3654079
user3654079

Reputation: 1

Why did my jQuery accordion stop working?

My accordion isn't working. It was working fine, but recently stopped. I checked to make sure I'm sourcing the correct js file along with google's jQuery UI. Can you see what I'm doing wrong?

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

The javascript code is:

<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>

The HTML Code is:

<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>

Nothing has changed regarding the js files from when the accordion was working. Thank you very much for your help!

Upvotes: 0

Views: 338

Answers (2)

Samsquanch
Samsquanch

Reputation: 9146

Change:

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

To:

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

The problem is arising from your inclusion of jQuery twice. Viewing the source of the page, you're including v1.11.1 on line 13 and v1.7.2 on line 78. You'll either need to remove one of those versions or use my solution above.

Upvotes: 3

isherwood
isherwood

Reputation: 61083

Something is hijacking the jQuery namespace. Try this:

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

Upvotes: 0

Related Questions