[ 3 posts ]

rolfsf

  • Username: rolfsf
  • Joined: Mon Mar 16, 2009 8:29 am
  • Posts: 29
  • Offline
  • Profile

YUI AccordionView: Span inside the trigger doesn't toggle

Post Posted: Tue Jan 12, 2010 11:39 am
+0-
I'm using Marco's Accordion View widget: http://www.i-marco.nl/weblog/yui-accordion/

My basic format is as follows:

Code:
<ul id="myAccordion">
<li>
    <div class="myTriggerElement">
        <span class="this">This</span>
        <span class="that">That</span>
    </div >
    <div class="yui-accordion-content">
        <p>content here</p>
    </div >
</li>
<li>
  ...etc
</li>
</ul>


Clicking on one of the spans in the trigger element fails to toggle the content panel. Clicking anywhere else in the trigger element works fine.

How do I enable the toggle behavior when clicking on elements within the trigger element?

Thanks!

Caridy Patino

YUI Contributor

  • Username: caridy
  • Joined: Mon Dec 08, 2008 5:40 pm
  • Posts: 492
  • Location: Miami, FL
  • Twitter: caridy
  • GitHub: caridy
  • Gists: caridy
  • IRC: caridy
  • YUI Developer
  • Offline
  • Profile

Re: YUI AccordionView: Span inside the trigger doesn't toggle

Post Posted: Thu Feb 11, 2010 7:37 am
+0-
Hey rolfsf,

Open a ticket for Marco to start using even delegation for the trigger, or use a diff component :-)

Here is a similar approach using AccordionManager:

http://bubbling-library.com/sandbox/acc ... licks.html

In this case, any element with the class "trigger" and its childs will fire the collapse/expand action.

Best Regards,
Caridy

rolfsf

  • Username: rolfsf
  • Joined: Mon Mar 16, 2009 8:29 am
  • Posts: 29
  • Offline
  • Profile

Re: YUI AccordionView: Span inside the trigger doesn't toggle

Post Posted: Thu Feb 11, 2010 12:31 pm
+0-
Thanks Caridy
I had looked at your accordion and considered it, but I had heard that Marco's widget was going to become an 'official' YUI widget, which would make it easier in the long run. I guess it was an false rumor :(
  [ 3 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum