title: Disable parallax on mobile
body: <p>I'm working on a website with fancy parallax scrolling background and followed the tutorial from Mohiuddin Parekh (available <a href="http://code.tutsplus.com/tutorials/a-simple-parallax-scrolling-technique--net-27641" rel="nofollow">here</a>)</p>
  
  <p>This is my javascript:</p>
  
  <pre><code>$(document).ready(function(){
  // Cache the Window object
  $window = $(window);
  
   $('section[data-type="background"]').each(function(){
   var $bgobj = $(this); // assigning the object
  
    $(window).scroll(function() {
  
      // Scroll the background at var speed
      // the yPos is a negative value because we're scrolling it UP!                              
      var yPos = -( ($window.scrollTop() - $bgobj.offset().top) / $bgobj.data('speed'));
  
      // Put together our final background position
      var coords = '50% '+ yPos + 'px';
  
      // Move the background
      $bgobj.css({ backgroundPosition: coords });
  
   }); // window scroll Ends
  
   });    
  
  });
  </code></pre>
  
  <p>This works great. Now what I would like to do, is not to execute the javascript if the site is viewed with a mobile device (max-width: 768px). Unfortunately I'm not quite sure how to achieve this, any help is appreciated :)</p>