Answer the question
In order to leave comments, you need to log in
Popup in popup?
There is such a code for opening a popup window.
open: function(e) {
var view = this
e.preventDefault()
var self = $(e.currentTarget)
var src = self.attr('data-open')
var href = self.href
if (src.substr(0, 1) === '#') {
$.fancybox($(src).html(), {
type: 'html'
});
} else {
$.fancybox.showLoading()
$.ajax({
type: 'get',
url: src,
data: {
'ajax': '1'
}
})
.done(function(data) {
var data = $(data)
$(data).find('form').bind('submit', function(e) {
view.submitAjax(e)
})
$.fancybox(data)
$('.fancyboxHide').click(function(event) {
$.fancybox.close();
});
})
.fail(function() {
$.fancybox.hideLoading()
alert('("' + src + '") окно не доступно,\nбудет выполнена переадресация')
window.location.href = href
})
}
},
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question