In jquery dialogs we can do
$("#id").dialog('open|close')
to open close dialogs. how to do this in Magnific-popup?
$.magnificPopup.open({
items: {
src: '#id'
},
type: 'inline'
});
http://dimsemenov.com/plugins/magnific-popup/documentation.html#public_methods