Skip to content

Instantly share code, notes, and snippets.

@muks999
Forked from artikus11/Modal2Divi
Created October 9, 2018 13:02
Show Gist options
  • Save muks999/edca884a8e380ef24d90ee04ec698e7f to your computer and use it in GitHub Desktop.
Save muks999/edca884a8e380ef24d90ee04ec698e7f to your computer and use it in GitHub Desktop.
Инициализация всплывающего окна для темы Divi
<script type="text/javascript">
jQuery(document).ready(function($) {
$('#modal1, #modal-1').magnificPopup({
type: 'inline',
preloader: false,
callbacks: {
beforeOpen: function() {
if($(window).width() < 700) {
this.st.focus = false;
} else {
this.st.focus = '#name';
}
}
}
});
});
</script >
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment