title: Trying to move wordpress title on mobile only
body: <p>Currently trying to finish a Wordpress build but I've ran into a slight problem.</p>
  
  <p>I'm using the following Jquery code:</p>
  
  <pre><code>jQuery( document ).ready( function ($) {
      var mobile = $(window).width();
      if ( mobile &lt;= 680 ){
          $( ".product_title.entry-title" ).insertBefore( ".woocommerce-product-gallery" );
      }
  } );
  
  </code></pre>
  
  <p>So when the screen is less than 680px the class "product_title.entry-title" will be inserted before the "woocommerce-product-gallery" class. This basically moves the title ABOVE the product gallery on my product page.</p>
  
  <p>BUT it's bugging me out because this code is only triggered every time the page is refreshed. So if I load the page and resize the browser nothing will happen until I refresh it. Is there any alternative method I can use to avoid this?</p>