Fancybox onClose not working
Fancybox onClose not working
我正试图重定向到.fancybox的"onclose"属性上的URL……它确实有效。有什么想法吗?代码如下。注意:模态看起来不错,但当用户按下顶部的"x"时。。。屏幕上一片空白。
<script type="text/javascript">
showModal();
function showModal() {
var url = document.URL;
var popUp = '//local.meau.com/Support-Center/Service-Notifications/Search-Tips.aspx';
var site = popUp;
$(document).ready(function () {
$.fancybox({
'width': 500,
'height': '55%',
'autoScale': false,
'transitionIn': 'none',
'transitionOut': 'none',
'type': 'iframe',
'href': site,
'showCloseButton': true,
'onClose' : function(){location.href = "http://local.meau.com/Support-Center.aspx";}
});
});
}
</script>
更新代码以读取
window.location = "http://local.meau.com/Support-Center.aspx"
仔细检查onClose回调以及
- v1.2-http://fancybox.net/api/126-
callbackOnClose
- v1.3-http://fancybox.net/api-
onClosed
- v2.0-http://fancyapps.com/fancybox/#docs-
beforeClose
或afterClose
相关文章:
- $rootScope not working
- jQuery document.ready not working
- Javascript getElementsByTagName not working?
- JQuery.val( ) not working
- Tomcat websocket is not working
- Javascript JSON.parse not working
- NodeJS Multer is not working
- Regex not working
- Ember run.debounce not working
- AngularJs 1 not working
- document.getElementById.style.backgroundImage not working
- Rxjs5, distinct() is not working
- createOscillator noteOn not working
- Javascript - .getHours() not working
- Javascript setTimeout not working | onkeydown
- MongoDB $pull not working
- Express router.use not working
- JSONP not working
- window.opener not working in chrome & IE
- Backbone + RequireJS: Collection.each() is not working