Popup popup'e?

There's a code to open 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 + '") window not available\pbody made forwarding')
 window.location.href = href
})
}
 },

Tell me, how can I change the script so that pop-up it was possible to open another popup by clicking on data-open?
July 12th 19 at 17:34
1 answer
July 12th 19 at 17:36
Solution
People write so that fancybox can only open one window by design
ie the idea is technically impossible to implement? - cecilia.Leuschke commented on July 12th 19 at 17:39
: you crutches, but it is itself the method. For example detectit before opening fb already created window, save contents, write a new fb window with the new content... Try to rewrite fancybox (-:

You can make a willful decision, throwing fancybox, and replacing it with, for example, on Arcticmodal. Moreover, judging by the code, the interface software will not even change. - amalia_Barrows22 commented on July 12th 19 at 17:42
: And you cannot say that we have opened the first window, where we click the first opens and closes the second? - cecilia.Leuschke commented on July 12th 19 at 17:45
: I would love to abandon fb, the problem is that this plugin is used in the whole project. Wherever need those modal Windows ( - cecilia.Leuschke commented on July 12th 19 at 17:48

Find more questions by tags Backbone.jsJavaScriptfancyBox