Note that there are some explanatory texts on larger screens.

plurals
  1. POSlide Menu Transition
    primarykey
    data
    text
    <p>I have a left slide in menu. When I load the page it animates and "slides in" automatically. My transition speeds are set in the CSS. The problem is that the call function (see below) has a very unsmooth transition. If I add a speed (300) after .click it doesn't work at all. </p> <p>The script is :</p> <pre><code> &lt;script&gt; $(document).ready(function() { $('#showLeft').click(); });&lt;/script&gt; </code></pre> <p>CSS Transitions:</p> <pre><code>.cbp-spmenu { -webkit-transition: all 0.3s ease; -moz-transition: all 0.3s ease; transition: all 0.3s ease; </code></pre> <p>}</p> <p>If anyone has any ideas or advice on how to make the slide transition smooth. I'd be much obliged.</p> <p>Javascript:</p> <pre><code>//slidemenu.js var menuLeft = document.getElementById( 'cbp-spmenu-s1' ), showLeft = document.getElementById( 'showLeft' ), body = document.body; showLeft.onclick = function() { classie.toggle( this, 'active' ); classie.toggle( menuLeft, 'cbp-spmenu-open' ); disableOther( 'showLeft' ); }; function disableOther( button ) { if( button !== 'showLeft' ) { classie.toggle( showLeft, 'disabled' ); } } </code></pre> <p>HTML </p> <pre><code>&lt;body class="cbp-spmenu-push"&gt; &lt;!-- Side Menu --&gt; &lt;nav class="cbp-spmenu cbp-spmenu-vertical cbp-spmenu-left" id="cbp-spmenu-s1"&gt; &lt;button id="showLeft" class="menuOpen"&gt;&lt;i class="icon-reorder icon-small"&gt;&lt;/i&gt;&lt;/button&gt; &lt;div class="side-panel-top"&gt;&lt;a href="index.html" id="logo"&gt;&lt;img src="images/backgrounds/logo.png"&gt;&lt;/a&gt;&lt;/div&gt; &lt;ul class="sidemenu"&gt; &lt;li&gt;&lt;a href="#"&gt;Twitter&lt;i class="icon-chevron-right icon-small"&gt;&lt;/i&gt;&lt;/a&gt; &lt;ul class="sidesub"&gt; &lt;li&gt;&lt;a href="#"&gt;Twitter&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Read&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Twitter&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Github&lt;i class="icon-chevron-right icon-small"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Facebook&lt;i class="icon-chevron-right icon-small"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Github&lt;i class="icon-chevron-right icon-small"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Facebook&lt;i class="icon-chevron-right icon-small"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/nav&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