We help IT Professionals succeed at work.

Lost my ul marks when I use the jQuery Accordian

lapucca
lapucca asked
on
I lost all the look of unsorted list items when I put the div for accordiaon in my code.  How to fix this?  Thank you.
            <div id="accordion">
                <h3>List of items</h3>
                        <ul>  
                              <li>Item 1</li>      
                              <li>Item 2</li>            
                              <li>Item 3</li>
                        </ul>
            </div>
Comment
Watch Question

Senior Software Engineer
Top Expert 2009
Commented:
You are missing the div (lines 3 and 9 below) after the h3 element as shown here.
<div id="accordion">
  <h3>List of items</h3>
  <div>
     <ul>  
       <li>Item 1</li>      
       <li>Item 2</li>            
       <li>Item 3</li>
     </ul> 
  </div> 
</div> 

Open in new window

Author

Commented:
Migues,
Div fixed the problem.  Question though, it was working fine before I use the Accordian.   It's doesn't seem that I need div for using UL tag before.  Is it require here becuase of using accordion?
Thank you.
Miguel OzSenior Software Engineer
Top Expert 2009

Commented:
Yes that is the construct Jquery UI uses to identify the section body.

Author

Commented:
got it!  Thank you.