Note that there are some explanatory texts on larger screens.

plurals
  1. POTrouble with jQuery UI accordion (collapsable)
    text
    copied!<p>Having trouble with jQuery again-- This time, I need a collapsible accordion for my navigation.</p> <p>When I click on "work" I want the list to open. I'm currently using the same jquery used in the example <a href="http://jqueryui.com/accordion/#collapsible" rel="nofollow">here</a>.</p> <p>Right now, I'm just trying to get it to work... But I would like it to default to collapsed so it can be opened. Not sure how to do that part.</p> <p>Here's a fiddle: <a href="http://jsfiddle.net/bG52W/" rel="nofollow">http://jsfiddle.net/bG52W/</a> </p> <p>The HTML</p> <pre><code>&lt;ul class="accordion"&gt; &lt;li&gt;&lt;a href="#"&gt;&lt;h1&gt;work&lt;/h1&gt;&lt;/a&gt;&lt;/li&gt; &lt;ul class="nav"&gt; &lt;li&gt;&lt;a href="#section1"&gt;&lt;p class="nav_p"&gt;anatomy of type&lt;/p&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#section2"&gt;&lt;p&gt;clash album redesign&lt;/p&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#section3"&gt;&lt;p&gt;"ghost" book jacket&lt;/p&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#section4"&gt;&lt;p&gt;charlie chaplin&lt;/p&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#section5"&gt;&lt;p&gt;design influence&lt;/p&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#section6"&gt;&lt;p&gt;"thrift thoughts" zine&lt;/p&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#section7"&gt;&lt;p&gt;cigarette card illustration&lt;/p&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#section8"&gt;&lt;p&gt;"frosty" winecooler packaging&lt;/p&gt;&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;li&gt;&lt;a href="#"&gt;&lt;h1&gt;about&lt;/h1&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;&lt;h1&gt;contact&lt;/h1&gt;&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; </code></pre> <p>The jQuery</p> <pre><code>$(function() { $( "#accordion" ).accordion({ collapsible: true }); }); </code></pre> <p>Any and all help is appreciated!! </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload