title: How to rotate icon smoothly?
body: <p>I can't rotate the icon smoothly, I'm not sure why if anyone could help I will very much appreciate it!</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-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;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;script defer src="https://use.fontawesome.com/releases/v5.0.6/js/all.js"&gt;&lt;/script&gt;
      &lt;script src="https://code.jquery.com/jquery-3.1.1.js"&gt;&lt;/script&gt;
  
      &lt;!-- style --&gt;
      &lt;style media="screen"&gt;
        div{
            background:red;
            width:20px;
            height:60px;
        }
        .rB {
          transform: rotate(180deg);
          transition: all 2s linear;
        }
      &lt;/style&gt;
    &lt;/head&gt;
    &lt;body&gt;
  
      &lt;button id="button" type="button" name="button"&gt;Rotate&lt;/button&gt;
      &lt;i class="fab fa-twitter"&gt;&lt;/i&gt;
      &lt;div&gt;&lt;/div&gt;
  
      &lt;!-- script --&gt;
      &lt;script&gt;
        $(function(){
          $("#button").on('click', function(){
            $(this).siblings().toggleClass('rB');
            });
        });
      &lt;/script&gt;
    &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I've added a div
  <a href="https://codepen.io/SalahGfx/pen/yvJqVO" rel="nofollow noreferrer">https://codepen.io/SalahGfx/pen/yvJqVO</a></p>