title: Disable Fancybox on Mobile
body: <p>After a lot of research and frustration I think I may have made an error in my methods to disable fancybox on mobile devices</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $(document).ready(function() 
  
  { 
  if( $(window).width() &gt; 480 &amp;&amp; (!navigator.userAgent.match(/Android/i) ||
  !navigator.userAgent.match(/webOS/i) ||
  !navigator.userAgent.match(/iPhone/i) ||
  !navigator.userAgent.match(/iPod/i) ||
  navigator.userAgent.match(/BlackBerry/))
  ){
  $("a#for_fancybox").fancybox({
  'overlayShow'  : false,
  'transitionIn' : 'elastic',
  'transitionOut'    : 'elastic'
  }
  else( $("a#for_fancybox").fancybox({ "scrolling": "yes", "centerOnScroll": "yes",        "showCloseButton": true, "height": "95%", "width": "95%", "type": "iframe", "autoScale": true,   "cyclic": true, "overlayOpacity": 0.8, "showNavArrows": false, "titleShow": false, "content":     "&lt;div&gt; n"}
  
  &lt;/script&gt;
  </code></pre>
  
  <p>I'm sure it's something simple and will appreciate any advice anyone can offer.</p>
  
  <hr>
  
  <p>*I've kept playing and am getting somewhere, however the script is still running on mobiles. I'm wondering if I've performed the detectmobilebrowser.js execution correctly (turn into .js file &amp; place script tag in site's header file).</p>
  
  <pre><code>`&lt;script type="text/javascript"&gt;
  if( !jQuery.browser.mobile){
  $(document).ready(function() {
  $("#single1").fancybox({
  "scrolling": "yes", "centerOnScroll": "yes", "showCloseButton": true, "height": "95%",     "width": "95%", "type": "iframe", "autoScale": true, "cyclic": true, "overlayOpacity": 0.8,     "showNavArrows": false, "titleShow": false, "content": "&lt;div&gt; n" 
  });
  $("#single2").fancybox({
  "scrolling": "yes", "centerOnScroll": "yes", "showCloseButton": true, "height": "95%",     "width": "95%", "type": "iframe", "autoScale": true, "cyclic": true, "overlayOpacity": 0.8,     "showNavArrows": false, "titleShow": false, "content": "&lt;div&gt; n" 
  });
  });
  }
  &lt;/script&gt;`
  </code></pre>