i am using fancybox function in jquery. i am opening loign box on click a tag and calling login box html in its href attribute, i spepartly have login box html within it i have another link name “register” on this i calling another fancybox and i want to refresh page on its close. but this is not happning. here is code below
$(".login").fancybox({
'padding': 0,
'margin': 0,
'width': '45',
'height': '480.0',
'autoScale': false,
'transitionIn': 'none',
'transitionOut': 'none',
'type': 'iframe'
});
$(".register").fancybox({
'padding': 0,
'margin': 0,
'width': '45',
'height': '480.0',
'autoScale': false,
'transitionIn': 'none',
'transitionOut': 'none',
'type': 'iframe',
'onClosed' : function () { self.parent.location.reload(); }
});
<a href="login.html" class="login">login</a>
//inside login.html (it is showing on when popup comes)
<a href="register.html" class="register">register</a> // register class not applying of this, it is coming under login class
Unless you are using an iframe to load the data in the fancy box you dont need to reference to the parent, try with: