title: change a href when click div jquery
body: <p>My problem is that I can't change a <code>href</code> in my <code>div</code> after click.</p>
  
  <p>Here's the code:</p>
  
  <pre><code>&lt;div class="menu"&gt;&lt;a href="#second"&gt;Dalej&lt;/a&gt;&lt;/div&gt;
  </code></pre>
  
  
  
  <pre><code>var i=1;
  var x1 = '&lt;a href="#second"&gt;Next&lt;/a&gt;';
  var x2 = '&lt;a href="#three"&gt;Next&lt;/a&gt;';
  $(".menu").click(function(){
    if (i==1) {$(this).html(x);i++;}
    if (i==2) {$(this).html(x2);i++;}  
  });
  </code></pre>
  
  <p>Why it doesn't work?</p>