Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7175851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:23:16+00:00 2026-05-28T16:23:16+00:00

Got a problem with an accordion script, the accordion worked when I was working

  • 0

Got a problem with an accordion script, the accordion worked when I was working with it with straight html, but now having moved to wordpress the accordion has stopped working.

Here is my code

  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
  <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
  <script>
  $(document).ready(function() {
    $("#accordion").accordion();
  });
  </script>
<?php wp_head(); ?>

and the html:

            <div id="accordion">
 <div class="button"><a href="#">Infrastructure</a></div>
    <div><?php
            if (function_exists('iinclude_page')){
                iinclude_page('sectors/infrastructure');
            }?>
            </div>
    <div class="button"><a href="#">Housing</a></div>
    <div><?php
            if (function_exists('iinclude_page')){
                iinclude_page('sectors/housing');
            }?></div>
                <div class="button"><a href="#">Education</a></div>
    <div><?php
            if (function_exists('iinclude_page')){
                iinclude_page('sectors/education');
            }?></div>
                <div class="button"><a href="#">Health</a></div>
    <div><?php
            if (function_exists('iinclude_page')){
                iinclude_page('sectors/health');
            }?></div>
</div>

I really do not understand the problem, as it worked in straight html. I have even tried removing the include function with straight text and it still doesn’t work?

Any ideas? There are no other jquery objects interfearing either.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T16:23:17+00:00Added an answer on May 28, 2026 at 4:23 pm

    You’re loading jQuery twice (1.5 followed by 1.7.1), and loading jQuery UI after loading 1.5 but before loading 1.7.1. So here’s what happens:

    1. jQuery 1.5 is loaded.

    2. jQuery UI is loaded and attaches itself to the jQuery object that exists at that point.

    3. jQuery 1.7.1 is loaded, completely replacing the jQuery object.

    4. Your code runs, using the (1.7.1) jQuery object, which jQuery UI hasn’t added its goodness to.

    If you load jQuery just once, and make sure you load jQuery UI afterward, it’ll work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I got a problem like this (this is html/css menu): Eshop | Another eshop
Bit of a strange problem here... I've got an update query that isn't working,
I have started a jetty server in my remote server. But I got problem
I'm making a timeline view in html but I ran into the following problem:
i got problem with my code and hopefully someone able to figure it out.
I've got problem with connecting to MySQL database on my freshly installed Windows 7
Got a problem with ADOMD.NET 8.0, SQL2008 and our app. It isn't giving us
Got a problem with a query I'm trying to write. I have a table
Got a problem with ComponentListener. I'm using it to check if a certain component
I got one problem at my exam for subject Principal of Programming Language. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.