I have changed it to:
$("#accordion1, #accordion").accordion();

then I have two divs:
<div id="accordion1">...</div>
<div id="accordion">...</div>

The first one still doesn't get get rendered but the second one is
ok.
Thanks though for the "$("#accordion1, #accordion").accordion();", I
didn't that it could be done that way.

Probably I should mention that I am using the accordion inside a
jquery ui tab. The two accordions are in different tabs.


On Aug 7, 11:43 am, Jörn Zaefferer <[email protected]>
wrote:
> With that code, you need two elements with these ids:
>
> <div id="accordion">...</div>
> <div id="accordion1">...</div>
>
> Ids, not classes. For classes, it would look like this:
>
> <div class="accordion">...</div>
> <div class="accordion1">...</div>
>
> $(function() {
>                $(".accordion").accordion();
>                $(".accordion1").accordion();
>        });
>
> Better yet, with just one selector:
>
> $(".accordion, .accordion1").accordion();
>
> Or just use the same class for both (not possible with ids).
>
> Jörn
>
> On Fri, Aug 7, 2009 at 10:23 AM, Peter<[email protected]> wrote:
>
> > Hi,
> > How can I have two accordions on the same page? I have tried the using
> > two different classes but that doesn't work.
> > $(function() {
> >                $("#accordion").accordion();
> >                $("#accordion1").accordion();
> >        });
>
> > Using the same class for both accordions causes only the first
> > accordion to be rendered but not the last one in the page.
>
> > Any help is greatly appreciated.
>
> > Thanks,
> > Peter.
>
>
--~--~---------~--~----~------------~-------~--~----~
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