title: How to display icon next to show/hide text on button?
body: <p>I want to display an icon next to "more" and "less" after clicking the less/more.</p>
  
  <p>How to make multiple buttons/id's like this? Basing on checked solution. –</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>function showme(id) {
    var divid = document.getElementById(id);
    var clicky = document.getElementById("clicky");
    if (divid.style.display == 'block') {
      divid.style.display = 'none';
      clicky.innerHTML = "MORE";
    } else {
      divid.style.display = 'block';
      clicky.innerHTML = "LESS";
    }
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  
  &lt;head&gt;
    &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
    &lt;link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
    &lt;i&gt;Click on more. I want to have two different icons one for more one for less always after click.&lt;/i&gt;&lt;br&gt;
  
    &lt;div class="tp-caption rev-btn rev-hiddenicon  rs-hover-ready rev-mre-btn" onclick="showme('widget');" href="javascript:;" id="clicky"&gt;MORE &lt;i class="fa fa-car"&gt;&lt;/i&gt;&lt;/div&gt;
  
  
    &lt;div id="widget" style="display:none;"&gt;
      This is a widget
    &lt;/div&gt;
  
  
  &lt;/body&gt;
  
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>