title: Bootstrap Dropdown Make Dropdown arrow change Direction
body: <p>I am looking for a way to make the bootstraps dropdown menu arrow change directions from facing up when menu is closed and down when menu is open.</p>
  
  <p><a href="https://i.stack.imgur.com/sIXCV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sIXCV.png" alt="enter image description here"></a></p>
  
  <p>This is my html code:</p>
  
  <pre><code>&lt;!-- Navigation --&gt;
  &lt;nav class="navbar navbar-trans navbar-fixed-top" role="navigation"&gt;
    &lt;!-- Container makes the navbar extend across the whole screen, removing the default curved sides --&gt;
    &lt;div class="container"&gt;
    &lt;!-- Brand and toggle get grouped for better mobile display --&gt;
      &lt;div class="navbar-header"&gt;
        &lt;button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapsible"&gt;
          &lt;span class="sr-only"&gt;Toggle navigation&lt;/span&gt;
          &lt;span class="icon-bar"&gt;&lt;/span&gt;
          &lt;span class="icon-bar"&gt;&lt;/span&gt;
          &lt;span class="icon-bar"&gt;&lt;/span&gt;
        &lt;/button&gt;
        &lt;a class="navbar-brand" href="#"&gt;Project Pandora&lt;/a&gt;
      &lt;/div&gt;
  &lt;!-- Collect the nav links, forms, and other content for toggling --&gt;
    &lt;div class="collapse navbar-collapse" id="navbar-collapse-1"&gt;
      &lt;ul class="nav navbar-nav"&gt;
      &lt;/ul&gt;
      &lt;ul class="nav navbar-nav navbar-right"&gt;
        &lt;% if defined?(Devise) %&gt;
          &lt;% if user_signed_in? %&gt;
            &lt;li class="dropdown"&gt;
              &lt;a href="#" class="dropdown-toggle" data-toggle="dropdown"&gt;Account &lt;b class="caret"&gt;&lt;/b&gt;&lt;/a&gt;
              &lt;ul class="dropdown-menu"&gt;
                &lt;li&gt;&lt;%= link_to "Edit Account", edit_user_registration_path %&gt;&lt;/li&gt;
                &lt;li&gt;&lt;a href="#"&gt;Do Something&lt;/a&gt;&lt;/li&gt;
                &lt;li class="divider"&gt;&lt;/li&gt;
                &lt;li&gt;&lt;%= link_to "Sign Out", destroy_user_session_path, method: :delete %&gt;&lt;/li&gt;
              &lt;/ul&gt;
            &lt;/li&gt;
          &lt;% else %&gt;
            &lt;li&gt;&lt;%= link_to "Login", new_user_session_path %&gt;&lt;/li&gt;
            &lt;li&gt;&lt;%= link_to "Sign Up", new_user_registration_path %&gt;&lt;/li&gt;
          &lt;% end %&gt;
        &lt;% end %&gt;
      &lt;/ul&gt;
    &lt;/div&gt;&lt;!-- /.navbar-collapse --&gt;
    &lt;/div&gt;&lt;!-- container-collapse --&gt;
  &lt;/nav&gt;
  </code></pre>
  
  <p>I think it would be easiest to do in js.</p>
  
  <p>Here is my jsfiddle code: <a href="https://jsfiddle.net/Pabi/RxguB/75/" rel="nofollow noreferrer">https://jsfiddle.net/Pabi/RxguB/75/</a></p>
  
  <p>Thank you.</p>