Hello, 

I'm developing a website and added an accordion section to the homepage, so
far it works pretty good,
I am just having a little problem,all of the links are closed by default I
will like to know how can I get
to have the first one opened by default.

this is the link while I'm still developing:     
http://www.constantbeta.info/index13.html

the content appears in a div class="content" , So like I said I will like
the first one to be opened by default and to have always one category
opened, not allowing the user to collapse all sections. Any help will be
much appreciated, thanks!


<script type="text/javascript">
$(document).ready(function(){
        $(".content").hide();                      
        $("a h1").click(function(){
                if($(this).is(".active")) {
         $(this).toggleClass("active");
                
         $(this).parent().next(".content").slideToggle();
         return false;
                } else {
                        $(".content:visible").slideUp("slow"); // close all 
visible divs with the
class of .content
                        $("h1.active").removeClass("active");  // remove the 
class active from
all h1's with the class of .active
                        $(this).toggleClass("active");
                        
                        $(this).parent().next(".content").slideToggle();
                        return false;
                }
        });
});
</script>
-- 
View this message in context: 
http://www.nabble.com/Accordion-working-fine%2C-just-needing-to-make-a-small-modification-tp19631666s27240p19631666.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to