magnific-popup


Adding onclose method in magnificPopup (that autoloads on pageload)


We have here a good example of adding onclose functions for magnificPopup.
However, this works when we call magnificPopup with an onclick event. I was wondering how to add onclose functions when magnificPopup autoloads on pageload.
Here is the code:
<?
if (is_array($flashMessage) && count($flashMessage) > 0) {
?>
<script>
$(document).ready(function() {
$.magnificPopup.open({
items: {
src: '#confirmation',
type:'inline'
}
});
});
</script>
<? } ?>
On this, I need to add onclose event with window.location. Thanks for any help.
The same?
$.magnificPopup.open({
items : {
src: '#test-popup',
},
type: 'inline',
callbacks: {
open: function () {
$.magnificPopup.instance.close = function () {
var confirmed = confirm("Are you sure?"+window.location.href);
if (!confirmed) {
return;
}
$.magnificPopup.proto.close.call(this);
};
}
}
});
I guess You had problems with type:'inline' in items object. Working fiddle

Related Links

Magnific pop-up only links to you tube
Magnific Popup close button placed in invalid html?
Magnific Popup - Google Maps Embed API must be used in an iframe
Magnific Popup Plugin Not Showing when Previewed in Browser
Magnific Popup Wordpress
Magnific vs PhotoSwipe
How to adjust video size magnific popup
$.magnificPopup.open() callbacks is not working
How do i setup magnific-popup
magnific-popup - re-initiate on ajax content
Magnific-popup cancels all requests on open
Magnific Popup fails to work with multiple galleries on a page
magnific-popup open in parent when calling from iframe
Magnific popup iframe closeOnBgClick does not work
Magnific Popup Text Links
Magnific popup - undefined is not a function when parsing markup

Categories

HOME
java
gitlab
atom-editor
webpack
homebrew
iot
cplex
react-redux
sqlite3
binary-tree
win32gui
pivotal-cloud-foundry
datastax-java-driver
networkx
azure-storage-tables
node-pdfkit
postgres-xl
gz
commonmark
messages
flask-wtforms
ups
graphlab
google-static-maps
solaris-10
lldb
emulator
immutable.js
scriptcs
opennlp
user-interaction
info.plist
strncpy
neo4j-spatial
vision
tasklet
stringtemplate
avcapturesession
fusionpbx
sharefile
tasker
galen
eigenvalue
estimote
wptoolkit
xml-documentation
azure-application-gateway
komodoedit
hls.js
mplayer
darcs
setter
jxcore
directory-structure
sqlclient
libusb-win32
np-complete
memory-alignment
lync-client-sdk
blacklist
url-pattern
pcf
gstreamer-0.10
master-slave
pickadate
ipconfig
php-parse-error
comobject
mutation-observers
varargs
splash
myo
unity5.2.3
notify
sorl-thumbnail
ng-animate
gadt
gui-test-framework
winddk
googlemock
imdbpy
prettify
uv-mapping
.aspxauth
sitemesh
odata4j
chronoforms
clipper
referrer
gil
manchester-syntax
errai
online-compilation
bubble-chart
nsmanagedobject
netdna-api
spyware
vdsp
django-tagging
getresponsestream
exchange-server-2003
temporal-database
wsdl.exe

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App