Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I remove this class after the jquery slide is in the up position?
    primarykey
    data
    text
    <p>I currently have the following code set up for a jQuery slide.</p> <pre><code>$(document).ready(function () { $('a#slide-up').click(function () { $('.slide-container').slideUp(); return false; }); $('a#slide-toggle').click(function () { if ($('.slide-container').is(':visible')) { $('.slide-container').slideUp(); $(this).removeClass('active'); } else { $('.slide-container').slideDown(); $(this).addClass('active'); } }); }); </code></pre> <p>And the html:</p> <pre><code>&lt;a id="slide-toggle"&gt;&lt;/a&gt; &lt;div class="slide-container"&gt; &lt;a id="slide-up"&gt;&lt;/a&gt; &gt;&gt;content&lt;&lt; &lt;/div&gt; </code></pre> <p>When I click on #slide-toggle, the class 'active' gets applied to it and div.slide-container slides down revealing the content and another link to slide the container back up (i.e a#slide-up). When I click on a#slide-up, the container slides back up but a#slide-toggle remains "active" with the class applied to it.</p> <p>I want it so that when I click on a#slide-up, the 'active' class gets removed. How can I do this?</p> <p>-edit-</p> <pre><code>$(document).ready(function() { $('a#slide-up').click(function () { $('.slide-container').slideUp(function(){ $('#slide-toggle').removeClass('active'); }); return false; }); $('a#slide-toggle').click(function() { if ($('.slide-container').is(':visible')) { $('.slide-container').slideUp(function() { $(this).removeClass('active'); } }) else { $('.slide-container').slideDown(); $(this).addClass('active'); } }); }); </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.
    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