show modal after form submission until next page loads… does not work on safari?

后端 未结 4 1370
既然无缘
既然无缘 2021-01-04 21:13

I have a button like this

4条回答
  •  一个人的身影
    2021-01-04 21:48

    try this

    
    

    https://jsfiddle.net/y64qyjzo/

    Update: added a timer to allow the user to notice the modal:

    $(document).ready(function() {
      $(".render").click(function(evt) {
        evt.preventDefault();
        $('#render_page').modal('show');
        setTimeout(function() {
          $('#testForm').submit();
        }, 1000)
      });
    });
    

    (add the id 'testForm' to the form)

    https://jsfiddle.net/y64qyjzo/3

提交回复
热议问题