title: Hide class pseudo-elements with JavaScript
body: <p>How to show/hide class :before and :after pseudo elements with JavaScript?</p>
  
  <p>I have arrows on both sides of div. Below is arrows style</p>
  
  <pre><code> .edit-wrap:before,
   .edit-wrap:after {
       @media (max-width: 768px) {
           content: '';
           ....
       }
   }
  </code></pre>
  
  <p>I want to hide them, if, for example, there is no scroll bar in the element. And show otherwise</p>
  
  <pre><code>var scrollableElement = document.getElementById('scrollable-element');
  if(scrollableElement.scrollWidth&gt;scrollableElement.clientWidth){
                 //display arrows
              } else{
                 //hide arrows
              }
  </code></pre>
  
  <p><strong>I am not using JQuery</strong></p>