Jquery Nyromodal: Reloading page after popup?
I want to reload my page, or get the data f开发者_开发百科rom 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.
精彩评论