title: Change toggle icon on click
body: <p>I'm new to jquery, trying to switch font awesome icons upon toggle click on my rails 5 app. I used <a href="https://stackoverflow.com/questions/15345784/change-icon-on-click-toggle">this</a> question to implement the feature, but I'm not seeing the icon change effect.</p>
  
  <pre><code>&lt;h2&gt;Spanish &lt;i id="click-spanish" class="fa fa-caret-down"&gt;&lt;/i&gt;&lt;/h2&gt;
  
  &lt;div id="spanish-examples" class="initiallyHidden"&gt;
    etc.
  &lt;/div&gt;
  </code></pre>
  
  <p>And the jquery:</p>
  
  <pre><code>$(document).ready(function(){
    $('#click-spanish').click(function() {
      $('#spanish-examples').toggle('1000');
      $("i", this).toggleClass("fa-caret-down fa-caret-up");
    });
  });
  </code></pre>
  
  <p>Removing <code>this</code> above achieves the result, but all other icons on the page change as well.</p>