title: How to append query string arguments to hyperlink URL using jQuery
body: <p>I have a fully working jQuery code to select a URL matching a specified domain:</p>
  
  <pre><code>jQuery( document ).ready( function( $ ) {
      $('a').each(function() {
  
          var href = $(this).attr('href');
  
  
          if(this.hostname &amp;&amp; this.hostname == 'example.com') 
          {                   
              $(this)
                  .removeAttr('target')
                  .attr('rel', 'nofollow')                
                  .attr('title', href)
         }
      });
  });
  </code></pre>
  
  <p>As you can see, it will remove the target attribute, add rel nofollow and set title to the URL value. Now I having issue on how to modify the above code to add another feature to append query string to the URL value (href value). Supposing I want to append the following query string arguments/values:</p>
  
  <pre><code>argument1='test1'
  argument2='test2'
  </code></pre>
  
  <p>such that the final URL will look like:</p>
  
  <pre><code>http://example.com/?argument1=test1&amp;argument2=test2
  </code></pre>
  
  <p>Or any page of the example domain like</p>
  
  <pre><code>http://example.com/any_page/?argument1=test1&amp;argument2=test2
  </code></pre>
  
  <p>Is there a simple method on doing this without using jQuery plugins?</p>