title: JQuery click function not working after removing and adding back elements
body: <p>this is my click function</p>
  
  <pre><code>$('.cal table tbody td').on('click', function () {
      if($(this).hasClass('available'))
      {
          alert('asd');
      }
  });
  </code></pre>
  
  <p>the problem i am having is that after i have switched to the next or previous month, my clicking function on the calendar does not work.</p>
  
  <p>For example in my JSFIDDLE, if u move to the previous month and then move back to the current month and do the click function, it wouldn't work anymore.</p>
  
  <p>EDIT: I'm using an external library called date.js, check out my jsfiddle for a clearer idea of what is going on.</p>
  
  <p>EDIT 2: updated jsfiddle link</p>
  
  <h2><a href="http://jsfiddle.net/kPY68/1/" rel="nofollow">jsfiddle</a></h2>