Hi, I've sent up an accordion on this site where I have used .accordion
("activate", index) to control parts of it.

http://www.digital-orchestrations.nxserve.net/

If you look ath the link 'Variation III' (in Italics) it toggles a
specific panel, and all the panels have a 'close' button in them.

Make sure that you enable 'collapsible'.

eg:

$("#accordion").accordion({
active: false,
collapsible: true,
autoHeight: false,
navigation: true,
header: '.menuitem'
});

$(".menuitem").click(function(event){
window.location.hash=this.hash;
});

});
</script>


(also enables linking from another page straight to a specific panel
(if you go to the page 'about' there is a slideshow and each slide
links to a different panel in the accordion).

Hope this helps, it took a while to work it all out!

Duncan.

On Mar 31, 9:39 am, Jörn Zaefferer <[email protected]>
wrote:
> Try this:
>
> $("#myaccordion").accordion({
>   event: ""
>
> });
>
> Then use .accordion("activate", index) to switch panels.
>
> Jörn
>
>
>
> On Mon, Mar 30, 2009 at 9:30 PM, MorningZ <[email protected]> wrote:
>
> > I saw the "option" method
>
> >http://www.jqueryui.com/demos/accordion/#method-option
>
> > but there's no clues on how to utilize it....
>
> > On Mar 30, 3:36 pm, Jörn Zaefferer <[email protected]>
> > wrote:
> >> You can use the event-option to disable the default handling. Using an
> >> empty string should do the trick.
>
> >> Jörn
>
> >> On Mon, Mar 30, 2009 at 4:39 PM, MorningZ <[email protected]> wrote:
>
> >> > I'm trying to fold in an accordion into a page and I'd like to stop
> >> > the user from going to a lower pane unless something is selected in
> >> > the previous ones  (kind of using the Accordion like a wizard)
>
> >> > is there any place to intercept the change to a new content pane while
> >> > I check some logic first?
>
> >> > I was hoping:
>
> >> > $("#Page_Accordion").accordion({
> >> >      change: function(e, ui) {
> >> >                        return (my Logic here);
> >> >       }
> >> > })
>
> >> > would do it, but that happens "too late"
>
> >> > Also tried:
>
> >> > $("#Page_Accordion h3").click(function() {
> >> >        return false;
> >> > });
>
> >> > and that doesn't stop the accordion action either
>
> >> > btw, i'm trying to avoid "disabling" the Accordion because I want the
> >> > first pane opened and not faded out from the CSS calling disabled
> >> > applies
--~--~---------~--~----~------------~-------~--~----~
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