Note that there are some explanatory texts on larger screens.

plurals
  1. POCSS HTML JQuery code doesn't work
    primarykey
    data
    text
    <p>I have some code on my website for a popout menu that should appear and disappear on click of the button, I'm pretty bad at debugging HTML and JQuery, would someone out there be able to find why it won't pop in and out?</p> <p><code>&lt;!DOCTYPE html&gt;</code></p> <p>At the top</p> <pre><code>&lt;script&gt; $('#trigger').click( function() { if ($('#popout').hasClass('hidden')) { $('#popout').removeClass('hidden'); showPopout(); } else { $('#popout').addClass('hidden'); hidePopout(); } }); function showPopout() { $('#popout').animate({ left: 200 }, 'slow', function () { $('#trigger span').html('Close'); //change the trigger text at end of animation }); } function hidePopout() { $('#popout').animate({ left: -200 }, 'slow', function () { $('#trigger span').html('Show'); //change the trigger text at end of animation }); } &lt;/script&gt; </code></pre> <p>In The Body</p> <pre><code>&lt;div id="popout" style="float:left;width:200px;"&gt; &lt;div id="nav-border-top"&gt; &lt;div id="nav-border-bottom"&gt; &lt;div class="container" style="width:200px;"&gt; &lt;table&gt; &lt;tr&gt; &lt;/tr&gt; &lt;/table&gt; &lt;table width="100%" cellpadding="3" cellspacing="3"&gt; &lt;tr id="nav1"&gt; &lt;a href="BLANKED"&gt;Home&lt;br&gt;&lt;/a&gt; &lt;/tr&gt; &lt;tr id="nav2"&gt; &lt;a href="BLANKED"&gt;Forum&lt;br&gt;&lt;/a&gt; &lt;/tr&gt; &lt;tr id="nav3"&gt; &lt;a href="BLANKED"&gt;Blog&lt;br&gt;&lt;/a&gt; &lt;/tr&gt; &lt;tr id="nav3a"&gt; &lt;a href="BLANKED"&gt;&gt; Photos Of BLANKED&lt;br&gt;&lt;/a&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt;&lt;!-- end container --&gt; &lt;/div&gt;&lt;!-- end nav-border-bottom --&gt; &lt;/div&gt;&lt;!-- end nav-border-top --&gt; &lt;/div&gt;&lt;!-- end nav-wrap --&gt; </code></pre> <p>Also</p> <pre><code>&lt;span id="trigger" style ="position:fixed;left:0;bottom:0;color:#d3222d;background-color:rgba(0,0,0,0.2);width:50px;height:25px;"&gt; Menu &lt;/span&gt; </code></pre> <p>CSS</p> <pre><code> #popout { position: fixed; /* fix the popout to the left side of the screen */ top: 50px; left: -200px; /* use a negative margin to pull the icon area of the popout off the edge of the page */ width: 75px; border: 1px dotted gray; color: gray; } #trigger { /* create a clickable area that triggers the slide in/out effect */ position: absolute; /* position clickable area to consume entire right section of popout (add a border if you want to see for yourself) */ top: 0; bottom: 0; right: 0; cursor: pointer; } </code></pre>
    singulars
    1. This table or related slice is empty.
    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.
 

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