title: How to check if url has no query string in jQuery?
body: <p>I am editing a form in WordPress. I want my jquery script to execute when the url has no query string.</p>
  
  <p>The url should not have a query string like this: <a href="http://127.0.0.1/mybetabizopi/login/?action=lostpassword" rel="nofollow">http://127.0.0.1/mybetabizopi/login/?action=lostpassword</a></p>
  
  <p>I only want my script to run when the url is like this or has no query string:
  <a href="http://127.0.0.1/mybetabizopi/login/" rel="nofollow">http://127.0.0.1/mybetabizopi/login/</a></p>
  
  <p>This is my current script:</p>
  
  <pre><code>var j = jQuery.noConflict();
  j(function() {
  
  
      j('#login #user_login').attr('placeholder', 'Username');
      j('#login #user_pass').attr('placeholder', 'Password');
  
      j('#login #user_login').addClass('form-control');
      j('#login #user_pass').addClass('form-control');
  
      j('#login #loginform label').wrap( "&lt;div class='input-group'&gt;&lt;/div&gt;" );
  
  
      j('#login .form-control').each(function() {
          j(this).insertAfter(j(this).parent());
      });
  
      j('#loginform .input-group &gt; label').remove();
  
      j('&lt;span class="input-group-addon" id="basic-addon1"&gt;&lt;span class="glyphicon glyphicon-user" aria-hidden="true"&gt;&lt;/span&gt;&lt;/span&gt;').insertBefore('#user_login');
  
      j('&lt;span class="input-group-addon" id="basic-addon1"&gt;&lt;span class="glyphicon glyphicon-lock" aria-hidden="true"&gt;&lt;/span&gt;&lt;/span&gt;').insertBefore('#user_pass');
  
  
  });
  </code></pre>
  
  <p>Any help is appreciated.</p>