Please consider using the accordion plugin, one component of jQuery
UI. I don't see any point in helping you implement your own when a
stable solution already exists.

Jörn

On Wed, Sep 24, 2008 at 5:38 AM, manuqc <[EMAIL PROTECTED]> wrote:
>
> 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>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to