Note that there are some explanatory texts on larger screens.

plurals
  1. POBootstrap Collapse "Shown" Event Not Working Correctly First Time
    text
    copied!<p>The "shown" event of the the collapse btn from Bootstrap Responsive is not firing correctly the first time and not setting the height to "auto". It works every time after the first expand, but never the first time.</p> <pre><code>&lt;div class="navbar navbar-inverse navbar-fixed-top"&gt; &lt;div class="navbar-inner"&gt; &lt;div class="container"&gt; &lt;a id="collapse-btn" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"&gt; &lt;span class="icon-bar"&gt;&lt;/span&gt; &lt;span class="icon-bar"&gt;&lt;/span&gt; &lt;span class="icon-bar"&gt;&lt;/span&gt; &lt;/a&gt; &lt;a class="brand" href="#"&gt;&amp;nbsp;&lt;/a&gt; &lt;div class="nav-collapse"&gt; &lt;ul class="nav pull-right" id="user-dropdown"&gt; &lt;li&gt; &lt;form class="navbar-search" action=""&gt; &lt;input type="text" class="search-query span3" placeholder="Search"&gt; &lt;/form&gt; &lt;/li&gt; &lt;li class=""&gt;&lt;a href="#"&gt;&lt;i class="icon-list icon-white"&gt;&lt;/i&gt; Categories&lt;/a&gt;&lt;/li&gt; &lt;li class=""&gt;&lt;a href="#"&gt;&lt;i class="icon-upload icon-white"&gt;&lt;/i&gt; Upload&lt;/a&gt;&lt;/li&gt; &lt;li class="dropdown" id="dropdown-click-user"&gt; &lt;a href="#" class="dropdown-toggle" data-toggle="dropdown"&gt;&lt;i class="icon-user icon-white"&gt;&lt;/i&gt; Username &lt;b class="caret"&gt;&lt;/b&gt;&lt;/a&gt; &lt;ul class="dropdown-menu" id="dropdown-menu-user"&gt; &lt;li&gt;&lt;a href="#"&gt;Action&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Another action&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt;&lt;!-- /.nav-collapse --&gt; &lt;/div&gt;&lt;!-- /.container --&gt; &lt;/div&gt;&lt;!-- /.navbar-inner --&gt; &lt;/div&gt;&lt;!-- /.navbar --&gt; </code></pre> <p>Please see <a href="http://jsfiddle.net/PKDmn/" rel="nofollow">http://jsfiddle.net/PKDmn/</a></p> <p>Steps to check:</p> <ol> <li>Make sure the screen width is small enough to see the collapse icon.</li> <li>Click the collapse icon (upper right)</li> <li>Click username dropdown (will not expand first time)</li> <li>Close the collapse menu (upper right)</li> <li>Open the collapse menu (upper right)</li> <li>Click username dropdown (Should work from here on)</li> </ol> <p>I need it to work the first time as well as all others. Thoughts?</p> <p>Thanks, Tim</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