Duncan
I'm not sure how that applies to what I am after
I've got this
<div id="Wizard">
<h3>Step 1</h3>
<div>Content for Step 1</div>
<h3>Step 2</h3>
<div>Content for Step 2</div>
<h3>Step 3</h3>
<div>Content for Step 3</div>
<h3>Step 4</h3>
<div>Content for Step 4</div>
</div>
and i don't want the user to be able to just "jump around" each panel
until they've selected something in the previous panels
so i have some global variables defined:
var AllowNav = {};
AllowNav[1] = true;
AllowNav[2] = false;
AllowNav[3] = false;
AllowNav[4] = false;
and if they select an item in pane 1, then i'll flip AllowNav[2] to
"true" and then they would be allowed to choose Step 2 (again, if they
are ready to, i don't want to programatically change the pane, i just
want to stop them from changing the pane
so kind of some pseudo code:
"if user clicks on <h3>Step 3</h3> and AllowNav[3] is false, then
don't change panes"
On Mar 31, 8:07 am, duncanm <[email protected]> wrote:
> 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
-~----------~----~----~----~------~----~------~--~---