Skip to content

Instantly share code, notes, and snippets.

@artikus11
Created March 17, 2017 08:53
Show Gist options
  • Save artikus11/4d2c1895d9e5b756d5f4d0ba6fa28204 to your computer and use it in GitHub Desktop.
Save artikus11/4d2c1895d9e5b756d5f4d0ba6fa28204 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