Custom Close button : Magnific Popups jQuery

0 Min. Read
Sep 30, 2014

 Rails Ruby JS

We can close magnific popup in various ways

We can add a button within the popup and assign a function on click event like

1
2
3
4
$('#close-button-verify').click(function(){
//This will close the most recently popped dialog //This method specially works for auto popped dialogs i.e. //Popup you opened using$.magnificPopup.open()    
    $.magnificPopup.close();
 });

If popup is triggered via onClick event then the same jQuery Object can be used to close that popup

1
2
3
$('#close-button-verify').click(function(){
    $('#id_of_button_that_opend_popup').magnificPopup('close');
 });

You might also like

Custom Close Button : Magnific Popups J Query 

ShivaShiva Bhusal (CTO) 0 Min. Read Sep 30, 2014
 Rails Ruby JS

We can close magnific popup in various ways We can add a button within the popup and assign a function on click event like $(‘#close-button-verify’).click(function(){ //This will close the most recently popped dialog //This method specially works for auto popped dialogs i.e. //Popup you opened using $.magnificPopup.open() $.magnificPopup.close(); }); If popup is triggered via onClick […]


Read More..


Write To Me

Hire me shiva bhusal
We'll never share your email with anyone else.
I'll never share your email with anyone else.