views:

70

answers:

2

Hi everybody,

I'm having a little trouble putting a JQuery accordion into a site. I feel like I'm doing everything right, but it is not working properly. I have put the site up, with some simple Lorem Ipsum text in the accordion. If anyone can help, it would be greatly appreciated. Here is the link: http://www.catanesedesign.com/test/events.html . I'm having trouble making the code legible on this site, but you can see the source at the link. There are divs without content at the bottom, but that is just because I haven't finished the page, and those shouldn't affect the accordion.

Thanks in advance for any help.

+2  A: 

First there seems to be a problem with your jQuery UI css file. It says 404 - not found.

dominik
wow i cant believe i missed that. that actually fixed the problem. thanks.
A: 

I took out the lavalamp stuff and used some other jquery files and got it to work:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; 
<html xmlns="http://www.w3.org/1999/xhtml"&gt; 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 
<title>Alliance for New Music Theater</title> 
<link href="css.css" rel="stylesheet" type="text/css" /> 
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"&gt;&lt;/script&gt;
  <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"&gt;&lt;/script&gt;
<script type="text/javascript"> 
    $(function() {
        $( "#accordion2" ).accordion();
    });
    </script> 
    <link href="jquery-ui-1.8.5.custom.css" rel="stylesheet" type="text/css" /> 
</head> 

<body> 
<div id="container" align="center"> 
<div id="header"> 
<img src="header.jpg" width="800" height="100" alt="curtains" /> 
</div> 
<div id="navbar"> 
<ul class="lavaLamp"> 
            <li><a href="#">Home</a></li> 
            <li><a href="#">Featured Work</a></li> 
            <li><a href="#">Featured Artist</a></li> 
            <li><a href="#">Members</a></li> 
            <li><a href="#">Events</a></li> 
        </ul> 
</div> 
<div id="row1">
<div id="accordion2"> 
    <h3><a href="#">Section 1</a></h3> 
    <div> 
        <p> 
        Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer
        ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit
        amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut
        odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.
        </p> 
    </div> 
    <h3><a href="#">Section 2</a></h3> 
    <div> 
        <p> 
        Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet
        purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor
        velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In
        suscipit faucibus urna.
        </p> 
    </div> 
    <h3><a href="#">Section 3</a></h3> 
    <div> 
        <p> 
        Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis.
        Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero
        ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis
        lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui.
        </p> 
    </div> 
    <h3><a href="#">Section 4</a></h3> 
    <div> 
        <p> 
        Cras dictum. Pellentesque habitant morbi tristique senectus et netus
        et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in
        faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia
        mauris vel est.
        </p> 
    </div> 
</div> 
</div> 
</div> 
</div> 
</body> 
</html> 
shady