title: modal pop-up closed and not refresh when open again
body: <p>I'm having modal pop-up with some validation, when I click on button it opens that modal with two text boxes and when I type there value I've some validation that put some text in case the entry is not valid, now when I close the modal and open it again I see the errors.</p>
  
  <p>I want to refresh the modal after close or in every time that I open it, any idea what is wrong here?</p>
  
  <p>I've tried the following and its not working ...I can see the alert but the modal is not refreshed.</p>
  
  <pre><code>function close() {
      alert("test");
      //$("#MYModal").removeData('bs.modal').empty();
      //$(document.body).removeClass('modal-open');
      $("#MYModal").removeData();
  }
  </code></pre>
  
  <p>Threre was suggestion to use the  following </p>
  
  <pre><code>$(document).on('hidden.bs.modal', function (e) {
      $(e.target).removeData('bs.modal').html('');
  });
  </code></pre>
  
  <p>But the problem is that after I close the modal its not opend...</p>