title: Scroll to Top script doesn't work - Bootstrap 4
body: <p>I have the following issue:
  I added a scroll to top script to my website (developed with Twitter Bootstrap 4v) and it doesn't work. However this script works on the same website which was developed with Bootstrap 3. I think that there's an error occurred with bootstrap version, but unfortunately I can't find the issue.</p>
  
  <pre><code>&lt;div class="toTop"&gt;
    &lt;a href="#"&gt;&lt;i class="icon-arrow-up icons"&gt;&lt;/i&gt;&lt;/a&gt;
  &lt;/div&gt;
  
  $('.toTop').on('click', function(event) {
    event.preventDefault();
    $('html, body').animate({ scrollTop: 0 }, 'slow');         
  });
  </code></pre>
  
  <p>Console:</p>
  
  <blockquote>
    <p>JQMIGRATE: Migrate is installed, version 1.4.1 smooth.js:2 Uncaught
    TypeError: $ is not a function
        at smooth.js:2 (anonymous) @ smooth.js:2</p>
  </blockquote>
  
  <p>This is a Wordpress theme built by me with Bootstrap 4 framework.
  in my case jQuery loads via functions.php with the following code:</p>
  
  <pre><code>// include custom jQuery
  function shapeSpace_include_custom_jquery() {
      wp_deregister_script('jquery');
      wp_enqueue_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js', array(), null, true);
  
  }
  add_action('wp_enqueue_scripts', 'shapeSpace_include_custom_jquery');
  </code></pre>