Note that there are some explanatory texts on larger screens.

plurals
  1. POFix twitter bootstrap collapse icons, glyphicons
    primarykey
    data
    text
    <p>I changed twitter bootstrap's behaviour so the whole panel-heading would trigger the accordion. This results in the 'up' icon not changing in the 'down' icon anymore.</p> <p>I am trying to fix this, but to no avail. How can I restore the correct behaviour of these icons?</p> <pre><code>&lt;script&gt; $(document).ready(function() { $('.accordion-toggle').on('click', function(e) { e.preventDefault(); if (!$('.panel-collapse').hasClass('.collapsed')) { console.log('toggle collapsed class') $('.indicator').removeClass('.glyphicon-chevron-up'); $('.indicator').addClass('.glyphicon-chevron-down'); } }); }); &lt;/script&gt; </code></pre> <p>Here's the structure of one of my accordion panels:</p> <pre><code>&lt;div class="panel panel-default"&gt; &lt;a href="#collapseOne" class="accordion-toggle" data-toggle="collapse" data-parent="#accordion"&gt; &lt;div class="panel-heading"&gt; &lt;i class="indicator glyphicon glyphicon-chevron-up pull-right"&gt;&lt;/i&gt; &lt;h4 class="panel-title"&gt; Title &lt;/h4&gt; &lt;/div&gt; &lt;/a&gt; &lt;div id="collapseOne" class="panel-collapse in"&gt; &lt;div class="panel-body"&gt; &lt;center&gt; &lt;p&gt;Some body..&lt;/p&gt; &lt;/center&gt; &lt;form class="form-search"&gt; &lt;h2 class="form-search-heading"&gt;Some heading..&lt;/h2&gt; &lt;input type="text" class="input-block-level" placeholder="Zoekterm" id="search-box"&gt; &lt;div id="resultaten"&gt;&lt;/div&gt; &lt;/form&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>PS: I'm using Bootstrap 3.0.1</p>
    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