简体   繁体   中英

Jquery Nyromodal: Reloading page after popup?

I want to reload my page, or get the data from my popup result, but I have no clue how. I try to reload the page using:

<script type="text/javascript">

$(function() {
  $.nyroModalSettings({
    endRemove: function() {
      window.location.reload();
    }
  });
});

$(function() {
  $('.nyroModal').nyroModal();
});

</script>
<a href="test.php" title="Test" class="nyroModal">Test</a>

But when I use this, the popup does not 'pop-up' at all anymore, it simply opens the test.php in the same window.

This settings (in NyroModal v2) allows to reload the page after closing the modal:

$(document).ready(function(){

    $('.nyroModal').nyroModal({
        callbacks: {
            afterClose: function() {
                parent.window.location.reload();
            }
        }
    });

});

Try

window.location = window.location;

to reload page.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM