title: Change the href when opening link in another div in the same page
body: <p>I have an "index.php" page to display all posts from database in a LEFT div as follows:</p>
  
  <pre><code>&lt;div class="col-md-6" id="left"&gt;
     &lt;a id="link" href="post.php?id=&lt;?php echo $postid;?&gt;"&gt;&lt;?php echo $submsg;?&gt;&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Also, I have a RIGHT div on same page to expand post when user click on the post link to "read more, comment, like.."  as follows:</p>
  
  <pre><code>&lt;div class="col-md-6" id="right"&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>And I have a "post.php" page to load it into the RIGHT div..</p>
  
  <p>And I have this Jquery script:</p>
  
  <pre><code>&lt;script&gt;
      $("a#link").click(function(e){
          e.preventDefault();
          $('#right').load(this.getAttribute('href'));
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>Everything is fine but there's only one problem which is the href of the page is always "index.php" and I want it to changes into the post link when It display in the RIGHT div.</p>
  
  <p>How can I do it?</p>
  
  <p>Thanks in advance.</p>