Skip to content

Commit 970bfb9

Browse files
authored
Create gprf-reload-modal-magnific.js
1 parent 555bdf9 commit 970bfb9

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Magnific Popup example using a link to trigger the modal
2+
// Replace ".open-popup" with your modal trigger
3+
// Replace "82" with the ID of your form
4+
$('.open-popup').magnificPopup({
5+
type:'inline',
6+
callbacks: {
7+
close: function() {
8+
var gwrf = window.gwrf_82;
9+
if( typeof gwrf != 'undefined' ) {
10+
gwrf.reloadForm();
11+
}
12+
}
13+
}
14+
});
15+
16+
// Example of how to bind to an already initialized Magnific Popup
17+
// Replace ".open-popup" with your modal trigger
18+
// Replace "82" with the ID of your form
19+
$('.open-popup').on('mfpClose', function() {
20+
var gwrf = window.gwrf_82;
21+
if( typeof gwrf != 'undefined' ) {
22+
gwrf.reloadForm();
23+
}
24+
});

0 commit comments

Comments
 (0)