I use $.magnificPopup.open() with callback method to handle the popup.
$.magnificPopup.open({
type: 'inline',
preloader: false,
modal: true,
items: {
src: $('#view_detail_popup')
},
closeBtnInside: false,
closeOnBgClick : false,
enableEscapeKey: false,
callbacks: {
//some fucntion here
}
});
But when I click to button to open the popup. The hashtag #view_detail_popup will be add to URL like:
localhost/project/items/list_item#view_detail_popup
I tried to use
$('.view_detail').magnificPopup({
type: 'inline',
preloader: false,
focus: '#view_detail_popup',
closeBtnInside:true,
modal: true
});
It didn't add #view_detail_popup to the link but I can't make the callback function for this. So... My question is: How can I click to open the popup without adding #view_detail_popup to URL?