title: How to get the value from query string in jQuery
body: <p>I am passing the value of username into the query string but i am unable to get the value of the name in jquery.</p>
  
  <p>this is my url </p>
  
  <pre><code>https://dev.hudpowerbid.com/front-end-pm/?fepaction=newmessageShami%20Kothari
  </code></pre>
  
  <p><strong>I want to get only Shami Kothari</strong></p>
  
  <p>this is how i am attaching the name with the query string</p>
  
  <pre><code>var name= jQuery(this).parent().siblings(".htb200").html();
  window.location.href ='https://example.com/front-end-pm/?fepaction=newmessage'+name;
  </code></pre>
  
  <p>this is how i am attaching name with url now i want to get this in jquery </p>
  
  <p>this is how I am getting the value.</p>
  
  <pre><code>function getUrlVars() {
  var url = 'https://example.com/front-end-pm/?fepaction=newmessage'+name;
  var vars = {};
  var hashes = url.split("?")[1];
  var hash = hashes.split('&amp;');
  
  for (var i = 0; i &lt; hash.length; i++) {
  params=hash[i].split("=");
  vars[params[0]] = params[1];
  }
  return vars;
  }
  </code></pre>