Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Try this...</p> <p><a href="http://jsfiddle.net/8YtDS/17/" rel="nofollow">http://jsfiddle.net/8YtDS/17/</a></p> <p><strong>HTML</strong></p> <pre><code>&lt;div id="wrapper"&gt; &lt;div id="menu-panel"&gt; &lt;ul class="nav nav-pills nav-stacked"&gt; &lt;li&gt;&lt;a href=""&gt;Do something&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href=""&gt;Do something&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href=""&gt;Do something&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href=""&gt;Do something&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;div id="content"&gt; &lt;nav class="navbar navbar-inverse" role="navigation"&gt; &lt;div class="navbar-header"&gt; &lt;a class="navbar-brand navbar-left" href="/" title=""&gt; MyBrand &lt;/a&gt; &lt;/div&gt; &lt;/nav&gt; &lt;button id="mybutton" class="btn btn-primary"&gt;Click me&lt;/button&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p><strong>CSS</strong></p> <pre><code>#wrapper{ position: relative; height: 100%; background: #F90; } #menu-panel{ width: 100px; position: absolute; left: -100px; top: 0; height: 100%; } #wrapper.open{ margin-left: 100px; } </code></pre> <p><strong>Javscript</strong></p> <pre><code>$("#mybutton").click(function () { $("#wrapper").toggleClass("open"); }); </code></pre> <p>Just a note from experience: avoid using jQuery animate to 'smooth' the slide. On certain browsers it was very jittery for me. CSS transforms should be used if possible, as I believe they are handled by GPU, jQuery as a fail safe (see Modernizr).</p> <p>Hope that was of some help! </p> <p>Thanks</p> <p>Phil</p>
    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.
    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