Note that there are some explanatory texts on larger screens.

plurals
  1. POJquery Accordion on unordered list
    primarykey
    data
    text
    <p>I need to do something like the below where my UL is collapsible but because the UL is generated from the ASP:Menu control I don't get an ID for the UL so I need to add the accordion to the class somehow. Does anyone know how to assign a Jquery effect to a class?</p> <pre><code>&lt;script type="text/javascript"&gt; $(function(){ $('#accordion').accordion(); }) &lt;/script&gt; &lt;ul id="accordion"&gt; &lt;li&gt; &lt;h3&gt;&lt;a href="#"&gt;header&lt;/a&gt;&lt;/h3&gt; &lt;div&gt; Content goes here &lt;/div&gt; &lt;/li&gt; &lt;li&gt; &lt;h3&gt;&lt;a href="#"&gt;header&lt;/a&gt;&lt;/h3&gt; &lt;div&gt; Content goes here &lt;/div&gt; &lt;/li&gt; &lt;/ul&gt; </code></pre> <p>Generated code:</p> <pre><code> &lt;ul class="level1"&gt; &lt;li&gt;&lt;a class="level1 staticItem level1"&gt; &lt;img src="/images/calculator.png" alt="" title="" class="icon" /&gt;Financial&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a class="level2 staticItem level2 selected" href="#" onclick="__doPostBack(&amp;#39;Menu1&amp;#39;,&amp;#39;4\\6&amp;#39;)"&gt;Address&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a class="level3 staticItem level3" href="/Controls/Financial/AddressBook.aspx" target="_blank"&gt;Address Book&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a class="level3 staticItem level3" href="/Controls/Financial/CustomerTypes.aspx" target="_blank"&gt;Customer Types&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a class="level1 staticItem level1"&gt; &lt;img src="/images/container.png" alt="" title="" class="icon" /&gt;Container&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a class="level1 staticItem level1"&gt; &lt;img src="/images/product.png" alt="" title="" class="icon" /&gt;Product&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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