I am having this exact same problem...i have cut and pasted directly from the site, but can't even get the example accordion to work!
Here is a link to my code: http://bin.cakephp.org/view/346411466 Any insight is much appreciated! On Mar 6, 7:39 pm, "Dave Maharaj :: WidePixels.com" <[email protected]> wrote: > Still no luck. I need the scriptaculous.js in there for other elements on > the page. > > In the view file: > <?php > echo $javascript->link(array('prototype', 'scriptaculous', 'effects', > 'accordion')); > ?> > > <div id="vertical_container" > > > <h2 class="accordion_toggle">Title Bar</h2> > <div class="accordion_content"> > <p>Well i listened to all you guys out there in my forum and my blog > and now all those wishes have been granted!</p> > <p> > <ul style="margin: 0 0 0 50px;"> > <li>Open/Close functionality added (Click on an > activeaccordion).</li> > <li>Nested Vertical Accordions</li> > <li>Accordions will dynamically resize on content added REAL > TIME!</li> > <li>...lots of bug fixes!</li> > </ul> > </p> > </div> > > <h2 class="accordion_toggle">Title Bar</h2> > <div class="accordion_content"> > <p>Well i listened to all you guys out there in my forum and my blog > and now all those wishes have been granted!</p> > <p> > <ul style="margin: 0 0 0 50px;"> > <li>Open/Close functionality added (Click on an > activeaccordion).</li> > <li>Nested Vertical Accordions</li> > <li>Accordions will dynamically resize on content added REAL > TIME!</li> > <li>...lots of bug fixes!</li> > </ul> > </p> > </div> > > <h2 class="accordion_toggle">Title Bar</h2> > <div class="accordion_content"> > > <p>Well i listened to all you guys out there in my forum and my blog > and now all those wishes have been granted!</p> > <p> > <ul style="margin: 0 0 0 50px;"> > <li>Open/Close functionality added (Click on an > activeaccordion).</li> > <li>Nested Vertical Accordions</li> > <li>Accordions will dynamically resize on content added REAL > TIME!</li> > <li>...lots of bug fixes!</li> > </ul> > </p> > </div> > </div> > > <script type="text/javascript"> > > Event.observe(window, 'load', > loadAccordions, false); > > function loadAccordions() { > > var bottomAccordion = > newaccordion('vertical_container'); > } > > </script> > > -----Original Message----- > From: Stu [mailto:[email protected]] > Sent: March-06-09 4:58 PM > To: CakePHP > Subject: Re:Accordion > > Not sure if you need the scriptaculous script for anything else, but you > don't need it for this. Also you're missing effects.js which is specified > on the website. > > You might wanna take out some of that code too, you don't need all of that, > for instance: > > > var topAccordion = new > >accordion('horizontal_container', { > > classNames : { > > toggle : > > 'horizontal_accordion_toggle', > > toggleActive : > > 'horizontal_accordion_toggle_active', > > content : > > 'horizontal_accordion_content' > > }, > > defaultSize : { > > width : 525 > > }, > > direction : 'horizontal' > > }); > > > var nestedVerticalAccordion = new > >accordion('vertical_nested_container', { > > classNames : { > > toggle : > > 'vertical_accordion_toggle', > > toggleActive : > > 'vertical_accordion_toggle_active', > > content : > > 'vertical_accordion_content' > > } > > }); > > > // Open second one > > > topAccordion.activate($$('#horizontal_container > > .horizontal_accordion_toggle')[2]); > > } > > All of that is if you wanted to use the nestedaccordionor the horizontal > accordions. > > try that and post whatever happens next. > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" 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/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
