title: If var condition to redirect to url
body: <p>I am trying to use the jQuery version of the mobile redirect script provided here - <a href="http://detectmobilebrowsers.com/" rel="nofollow">http://detectmobilebrowsers.com/</a></p>
  
  <p>The simple instruction says, "jQuery.browser.mobile will be true if the browser is a mobile device"</p>
  
  <p>I am trting to create a if condition to redirect the page but I am a newbie. Help would be appreciated.</p>
  
  <pre><code>var mobile = "jQuery.browser.mobile";
  var url = "http//domain.com/mobile";
  
  $(document).ready(function() {
      if (mobile = true) {
          $(location).attr('http://domain.com/mobile',url);
      }
  });
  </code></pre>