title: jQuery events stop working after partial view post in asp.net mvc(4) Part II
body: <p>I have a View with the following layout 
  <img src="https://i.stack.imgur.com/0fpUw.png" alt="enter image description here">
  The parent View is composed of several PartialViews. One of which is a list where each item has a corresponding Edit button which loads the item into another PartialView, but this is loaded via ajax into a modal bootstrap-dialog.</p>
  
  <p>By hitting the Edit buttons partials view are loaded without problem in the modal dialog but after Submit a dialog the Edit buttons stop to fire the event and the modal does not get loaded anymore, i mean, the click handler for Edit button stops working. </p>
  
  <p>I believe this is due to the fact that after posting the modal im ajax-reloading the List Partial View that contains Edit buttons and so i need to rebind the events. But by doing so  it would form a circular call beween the edit click event and modal form submit?</p>
  
  <p>The scripts in the Parent View:</p>
  
  <pre><code>$(".btn.mylink").on("click", function () {            
              var id = $(this).data('id');
              var url = "/SalidaDetalle/Edit/" + id;            
              $.get(url, function (data) {
                  $(".modal-body").html(data);
                  $('#myModal').modal('show');
  
                  $(".edit-detail").on('submit', function () {
                      $.post($(this).attr('action'),
                      $(this).serialize(), 
                      function (data, status) {                        
                          $('#myModal').modal('hide');
                          $("#details").html(data);
  
                      }).error(function (error, status, a, b) {
                          writeError('msgError', 'Error processing request. Please check errors and try again!');
                          $('.modal-body p.body').html(error.responseText);
  
                      });
                      return false;
                  });
  
              });
          });
  </code></pre>
  
  <p>Note:
  This question is related to <a href="https://stackoverflow.com/questions/24556680/using-jquery-with-partial-views-in-asp-net-mvc4">this one</a></p>