Hi

I think I'm also getting this problem.

I've just started using jQuery and I'm trying to make the accordion
'expand' after a brief mouse hover delay (eg. 1/2 second) as a
learning exercise.

I've got the hover expand part working fine but it also 'unexpands'
when I leave the mouse over an active element which I don't want it to
do.

My plan is to check if the option the user is hovering over is already
active use accordion('option','active')) and do nothing if it is.
However accordion('option','active')) always seems to return false.

Anyway the solution MorningZ suggested appears to be working but I
agree that I don't think it's the "cleanest" solution.

Good luck.

-Chris

On Feb 20, 2:24 am, Jeff Gentry <[email protected]> wrote:
> Hi there ...
>
> I'm trying unsuccessfully to grab the id/indexof theactivepane of 
> anaccordionwidget.  For example, using the example.html file that came with
> jqueryUI, I have:
>
> $("#accordion").accordion({ header: "h3"});
>
>                 <h2 class="demoHeaders">Accordion</h2>
>                 <div id="accordion">
>                         <div>
>                                 <h3><a href="#">First</a></h3>
>                                 <div>Lorem ipsum dolor sit amet. Lorem
> ipsum dolor sit amet. Lorem ipsum dolor sit amet.</div>
>                         </div>
>                         <div>
>                                 <h3><a href="#">Second</a></h3>
>                                 <div>Phasellus mattis tincidunt
> nibh.</div>
>                         </div>
>                         <div>
>                                 <h3><a href="#">Third</a></h3>
>                                 <div>Nam dui erat, auctor a, dignissim
> quis.</div>
>                         </div>
>                 </div>
>
> I then added a button which called a function in order to show me which
> pane wasactive:
>
>                                 $("#testAcc").click(function() {
>                                     var foo =
> $('#accordion').accordion('option', 'active');
>                                     alert(foo);
>                                     return false;
>                                 });
>
> This function always reports 'null'.  If I set theaccordion'sinitial
> structure to haveactive=false, the click function always returns
> 'false'.  I must be daft here as in the documentation they say that this
> pattern (('option', 'active')) is the getter for theactiveelement, but
> it seems to only ever report the initial state.
>
> What am I missing here?
>
> THanks
> -J

--~--~---------~--~----~------------~-------~--~----~
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