Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I toggle this with jQuery
    primarykey
    data
    text
    <p>Twitter Bootstrap <a href="http://twitter.github.com/bootstrap/javascript.html#dropdown" rel="nofollow">http://twitter.github.com/bootstrap/javascript.html#dropdown</a> has a dropdown.js library (at <a href="http://twitter.github.com/bootstrap/1.4.0/bootstrap-dropdown.js" rel="nofollow">http://twitter.github.com/bootstrap/1.4.0/bootstrap-dropdown.js</a> )that will change the "dropdown" class below to "dropdown open" which will make the dropdown menu open. </p> <p>I included the js file on my local site but it's not opening or toggling. I don't know if I have to add an extra method to tell the jquery file what element to select, or, if I just give the element class "dropdown" the js should work without anything more. </p> <p>I tried to figure it out using Firebug on the Twitter Bootstrap demo but I'm not that experienced with it. Please let me know if you know how to use this. Thank you. </p> <p>I'm using it on a Rails application but that shouldn't make a difference. It includes jquery automatically, and, as I said, I added dropdown.js. I'm just wondering if I have to do something more...</p> <pre><code> &lt;ul class="nav secondary-nav"&gt; &lt;li class="dropdown"&gt; &lt;a href="#" class="dropdown-toggle"&gt;Dropdown&lt;/a&gt; &lt;ul class="dropdown-menu"&gt; &lt;li&gt;&lt;a href="#"&gt;Secondary link&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Something else here&lt;/a&gt;&lt;/li&gt; &lt;li class="divider"&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Another link&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;/ul&gt; </code></pre>
    singulars
    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.
 

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