title: How to disable buttons in site that uses local storage?
body: <p>here is my <code>html</code></p>
  
  <pre><code>&lt;div class="col-md-9"&gt;
    &lt;table class="table table-striped table-bordered table-condensed"&gt;
      &lt;thead&gt;
        &lt;tr style="background-color: white"&gt;
          &lt;th&gt; &lt;i class="fa fa-male"&gt;&lt;/i&gt; Name &lt;/th&gt;
          &lt;th&gt;&lt;i class="fa fa-bars"&gt;&lt;/i&gt; Particular&lt;/th&gt;
          &lt;th&gt;&lt;i class="fa fa-envelope-o"&gt;&lt;/i&gt;Unit&lt;/th&gt;
          &lt;th&gt;&lt;i class="fa fa-map-marker"&gt;&lt;/i&gt;Quantity&lt;/th&gt;
          &lt;th&gt;&lt;i class="fa fa-phone"&gt;&lt;/i&gt;From&lt;/th&gt;
          &lt;th&gt;&lt;i class="fa fa-phone"&gt;&lt;/i&gt;Date&lt;/th&gt;
          &lt;th&gt;&lt;i class="fa fa-phone"&gt;&lt;/i&gt;TAKE actions&lt;/th&gt;
        &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
  
        &lt;tr&gt;
          &lt;td&gt;COMB&lt;/td&gt;
          &lt;td&gt;fasionable comb&lt;/td&gt;
          &lt;td&gt;SVP&lt;/td&gt;
          &lt;td&gt;3&lt;/td&gt;
          &lt;td&gt;Bindibhatt1&lt;/td&gt;
          &lt;td&gt;2014-03-22 18:15:34 UTC
          &lt;/td&gt;&lt;td&gt;
            &lt;form action="/requisitions/2" class="button_to" method="get"&gt;&lt;div&gt;&lt;input class="pos" data-confirm="Are you sure?" type="submit" value = "po" &gt;&lt;/div&gt;&lt;/form&gt;
  
          &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
        &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>AND MY <code>jquery</code></p>
  
  <pre><code>$(window).load(function(){
  
      $(".pos").click(function(e){
          debugger;
          localStorage.setItem("visited" + $(this).closest("tr").index(), true);
          $(this).css("color", "red"); // visited
      });
  
      for(var i = 0, len = $(".pos").length; i &lt; len; i++){
  
          if(localStorage.getItem("visited" + i)){
  
              $(".pos:eq(" + i + ")").css("color", "white"); // visited
  
          }else
          {
              $(".pos:eq(" + i + ")").css("color", "black"); // not visited
          }
      }
  });
  </code></pre>
  
  <p>I want the button which is clicked to be <code>disabled</code> and the <code>html</code> should be <code>generated</code> from <code>po</code>.</p>