title: go to link on button click - jQuery
body: <p>I have a script as below</p>
  
  <pre><code>$('.button1').click(function() {
      document.location.href=$(this).attr('id');
  });
  </code></pre>
  
  <p>the button1 has variable unique ids. on click, the page must redirect to url "<code>www.example.com/index.php?id=buttonid</code>" but now the page is redirecting only to "<code>button id</code>".</p>
  
  <p>I want to add the string "<code>www.example.com/index.php?id=</code>" before the current url. How can I make this possible?</p>