Open new page in JQuery bPopup

917 views Asked by At

I am using bPopup to open a page in popup container. Now, there is a link in the popup page, i want to open the new page in the already opened bPopup container. Assigning a new page link in anchor tag opens the new page in parent window. I have also used following approach in popup page:

$('.icoNext').bind('click', function(e) {
e.preventDefault();
$('.popup').bPopup({
    contentContainer:'.popup_content',
    modalClose: false,
    closeClass: 'closeFx',
    loadUrl:'device_new_assignTag.htm'
});

});

where the $('.icoNext') is the link in popup page and $(.popup) is in parent page.

1

There are 1 answers

0
Skippengs On BEST ANSWER

you could use the onclose function that is given on the website.

It does close the popup, but in the callback you can open a new popup.

  $('element_to_pop_up').bPopup({
        onOpen: function() { alert('onOpen fired'); }, 
        onClose: function() { alert('onClose fired'); }
    }, 
    function() {
        alert('Callback fired');
    });

http://dinbror.dk/bpopup/