Load jQuery script in desktop browser, but not mobile
<p>I want to load a particular jQuery script/function in desktop browsers, but not mobile browsers. At the moment, the script runs very slow on mobile browsers, but works fine on desktop browsers.</p>

<p>The function in question is a smooth scrolling plugin, so that when a user clicks a link, the page scrolls smoothly to the anchor on the same page. It is not necessary for it to scroll smoothly on mobile browsers - it is too slow, and often doesn't work.</p>

<p>What would I need to add to my code below to ensure that it is still executed as normal in desktop browsers, but not mobile (particularly iPad/iPhone/iPod)?</p>

<pre><code>  &lt;script&gt;!window.jQuery &amp;&amp; document.write(unescape('%3Cscript src="js/lib/jquery/jquery.js"%3E%3C/script%3E'));&lt;/script&gt;    
&lt;script src="js/css_browser_selector.js"&gt;&lt;/script&gt;
&lt;script src="js/src/jquery.smooth-scroll.js"&gt;    
&lt;/script&gt;
&lt;script src="js/lib/jquery.ba-bbq.js"&gt;&lt;/script&gt;
&lt;script&gt;
$(document).ready(function() {
  $('a[href*="#"]').live('click', function() {
    if ( this.hash ) {
      $.bbq.pushState( '#/' + this.hash.slice(1) );
      return false;
    }
  });

  $(window).bind('hashchange', function(event) {
    var tgt = location.hash.replace(/^#\/?/,'');
    if ( document.getElementById(tgt) ) {
      $.smoothScroll({scrollTarget: '#' + tgt});
    }
  });

    $(window).trigger('hashchange');
});
 &lt;/script&gt;
</code></pre>
