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

  • Home
  • SEARCH
  • 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 3780942
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T10:52:43+00:00 2026-05-19T10:52:43+00:00

I had this question before but I may not have asked it correctly the

  • 0

I had this question before but I may not have asked it correctly the first time, so here is my second attempt. I am creating a site with dynamic web pages. On one of these pages I have 3 accordions underneath a table, but surrounded in a Div called “wrapping”. In order to have these accordions seen as part of the dynamic page, I am including them within a Div I called “content” (as both ID name and class name for testing purposes).

Here is the HTML section for the dynamic content containing these accordions:

<body>
<form id="form1" runat="server" >
<div id="content" class="content">
    <table style="width: 1200px">
        <tr>
            <td style="width: 800px">
                <h1>Title</h1><br />
                blah blah
              </td>
          </tr>
    </table>

    <div id="wrapping" class="wrapping">
        <p class="accordionButton"><strong>Service 1</strong></p>
        <div class="accordionContent">  
            Item1<br />
            Item2<br/>
        </div>
        <p class="accordionButton"><strong>Service 2</strong></p>
        <div class="accordionContent">
            Item1<br />
            Item2<br />
        </div>
        <p class="accordionButton"><strong>Service 3</strong></p>
        <div class="accordionContent">
            Item1<br />
        </div>                       
    </div>
</div>
</form>
</body>

Here is the entire relevant Jquery code segment I’m using:

 $(document).ready(function() { 
   $('.wrapping').find('p.accordionButton').each(function() 
       { alert("found it") });  //Test

    //ACCORDION BUTTON ACTION    
    $('.wrapping').find('p.accordionButton').mouseover(function() {
        $('div.accordionContent').slideUp('normal');
        $(this).next().slideDown('normal');
    });

    //HIDE THE DIVS ON PAGE LOAD    
    $(".accordionContent").hide();
    });

Here is the CSS associated with the program, including some styles that do not apply for this example:

  #load {   
     display: none;   
     position: absolute;   
     right: 10px;   
     top: 10px;   
     background: url(images/ajax-loader.gif);   
     width: 43px;   
     height: 11px;   
     text-indent: -9999em;   
 }

 #nav-menu ul
 {
   list-style: none;
   padding: 0;
   margin: 0;
 }

 #nav-menu li
 {
    float: left;
    margin: 0 0.15em;
 }

 #nav-menu li a
 {
    background: url(background.gif) #fff bottom left repeat-x;
    height: 2em;
    line-height: 2em;
    float: left;
    width: 9em;
    display: block;
    border: 0.1em solid #dcdce9;
    color: #0d2474;
    text-decoration: none;
    text-align: center;
 }

  #nav-menu li a
 {
   float: none
 }

 #nav-menu
 {
   width:30em
 } 

.accordionButton
{
width: 650px;
float: left;
background: #99CC99;
border-bottom: 1px solid #FFFFFF;
cursor: pointer;
text-align: center;
 }

 .accordionContent {    
width: 650px;
float: left;
background: #95B1CE;
display: none;
}

Question:
I can find each of the accordion buttons on the page by the test statement above (I get 3 alerts, one for each accordionButton), but can’t do a mouseover using the same method. Why is that?

  • 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-19T10:52:43+00:00Added an answer on May 19, 2026 at 10:52 am

    I solved this issue by removing the code that enabled dynamic pages. That simplified the code and removed a level of complexity.

    The code shown above works, and I even made it fancier. If you are curious about it, check out my test site.

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

Sidebar

Related Questions

This question may have been asked before, but I had trouble finding an answer,
I know this question was asked before but I have the following simple code
This question may sound fairly elementary, but this is a debate I had with
Now I have seen this question in another forum but it didn't had an
This question HAS had to be asked before, so it kills me to ask
So, if this question has been asked before, I'm sorry. I'm not exactly sure
We've had this question already, but I want to narrow it down to already
The responses I've got to this question have solved the problem I had in
I had the same question as was asked in this thread , i.e. I
This may seem like a programming 101 question and I had thought I knew

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.