title: Toggle arrows at the end of the first line of text
body: <p>How to add arrows at the end of the first line text? And I want it point down when collapse and point up when expand. Like shown as images below. Appreciate your help, thanks!</p>
  
  <p><a href="https://i.stack.imgur.com/y18Ya.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/y18Ya.jpg" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/6JGE9.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6JGE9.jpg" alt="enter image description here"></a></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(".expander").click(function() {
      if ($(this).hasClass("expander")) {
          $(this).removeClass("expander");
      }
      else {
           $(this).addClass("expander");
      }
  });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.expander {
      height: 1em;
      overflow: hidden;
      cursor: pointer;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;div class="expander"&gt;
      Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32.
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Code taken from <a href="https://stackoverflow.com/questions/6972728/how-do-you-show-just-the-first-line-of-text-of-a-div-and-expand-on-click">here</a></p>