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 3671346
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T02:28:33+00:00 2026-05-19T02:28:33+00:00

I am trying to use jQuery accordion widget. I want to use a common

  • 0

I am trying to use jQuery accordion widget. I want to use a common javascript code inside all the accordion section. For e.g I am trying to make a tab view inside every accordion section. The tab view is handled through an external javascript file created by me. Also I am using images slideshow inside every section of the accordion.It works for the a single section only. Whenever i try to paste the same html code in the next section of the accordion , javascript does not execute. The accordion still works. Waiting for your suggestions.

This is the html code

            <div id="contentList"><h3 class="accHead" onclick="initAll('FoodCheck')">Food Check</h3>
        <div class="accContent">


                    <ul class="menuHoriz">
                        <li><a href="#" onclick="setView('what')">What ? </a></li>
                        <li><a href="#" onclick="setView('how')">How ? </a></li>
                        <li><a href="#"  onclick="setView('who')">Who ? </a></li>
                        <li><a href="#"  onclick="setScreenshotsView()">Screenshots </a></li>
                    </ul>



                    <div id="what" class="content">
                        <p>
                            Details about the projects<br /> What. description
                        </p>    

                    </div>
                    <div id="how" class="content">
                        <p>
                            Details about the projects<br /> How description
                        </p>    

                    </div>
                    <div id="who" class="content">
                        <p>
                            Details about the projects<br /> Who description
                        </p>    

                    </div>
                    <div id="screenshots" class="content">
                        <p>
                            <h2>FoodCheck Snapshots</h2>
                            <img height="468" width="250" src="images/FoodCheck/Screen_1.png" alt="First screen" id="slideshow" />
                            <div id="imgText"> &nbsp; </div>
                            <br clear="all" />
                            <form action="#">
                                <input type="button" id="prevLink" value="&laquo; Previous" />
                                &nbsp;<input type ="button" id="startAgain" value="Start Again">
                                <input type="button" id="nextLink" value="Next &raquo;" />
                            </form>
                        </p>    

                    </div>


        </div>

This is one of the section of accordion.
There are 3 more such sections. Each section has a Tabs (with id What, who, how, screenshots) in it which are controlled by an external javascript

In

<script type="text/javascript">
    $(function() {

        //set up the news accordion on the lower page
    $("#contentList").accordion({ header: "h3", collapsible: true});

  });

</script>
  • 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-19T02:28:34+00:00Added an answer on May 19, 2026 at 2:28 am

    You will have to subscribe to element events and not use some global javascript functionality. Every acordion view can have various controls but they would need to be distinguished by either class or id attributes to attach to their events.

    Some code would help of course. Can you provide some? but only relevant parts so ot won’t be overwhelming.

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

Sidebar

Related Questions

I'm trying to use jQuery.scrollTo plugin with accordion (where one block expands after clicking
I am trying to use jQuery's draggable and sortable to sort elements listed inside
I'm trying to use JQuery to select all of the TD 's in a
I am trying to use jquery autocomplete plugin, I want it to suggest ItemCodes
am trying to use the Jquery accordion to show a list of links generated
I am trying to use the jQuery CSV plugin, as documented here: http://code.google.com/p/js-tables/wiki/CSV According
In an attempt to follow best practices, we're trying to use the proper JavaScript/jQuery
First time I am trying to use jquery ajax in my php code. I
I've been trying to learn to use jQuery Javascript Templates. I was following the
While trying to use this jquery lightbox plugin for Bootstrap (click for source code),

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.