1/* 2Name: Shortcodes - Lightboxes - Examples 3Written by: Okler Themes - (http://www.okler.net) 4Theme Version: 4.4.0 5*/ 6 7(function( $ ) { 8 9 'use strict'; 10 11 /* 12 Popup with video or map 13 */ 14 $('.popup-youtube, .popup-vimeo, .popup-gmaps').magnificPopup({ 15 disableOn: 700, 16 type: 'iframe', 17 mainClass: 'mfp-fade', 18 removalDelay: 160, 19 preloader: false, 20 21 fixedContentPos: false 22 }); 23 24 /* 25 Dialog with CSS animation 26 */ 27 $('.popup-with-zoom-anim').magnificPopup({ 28 type: 'inline', 29 30 fixedContentPos: false, 31 fixedBgPos: true, 32 33 overflowY: 'auto', 34 35 closeBtnInside: true, 36 preloader: false, 37 38 midClick: true, 39 removalDelay: 300, 40 mainClass: 'my-mfp-zoom-in' 41 }); 42 43 $('.popup-with-move-anim').magnificPopup({ 44 type: 'inline', 45 46 fixedContentPos: false, 47 fixedBgPos: true, 48 49 overflowY: 'auto', 50 51 closeBtnInside: true, 52 preloader: false, 53 54 midClick: true, 55 removalDelay: 300, 56 mainClass: 'my-mfp-slide-bottom' 57 }); 58 59 /* 60 Form 61 */ 62 $('.popup-with-form').magnificPopup({ 63 type: 'inline', 64 preloader: false, 65 focus: '#name', 66 67 // When elemened is focused, some mobile browsers in some cases zoom in 68 // It looks not nice, so we disable it: 69 callbacks: { 70 open: function() { 71 $('body').addClass('lightbox-opened'); 72 }, 73 close: function() { 74 $('body').removeClass('lightbox-opened'); 75 }, 76 beforeOpen: function() { 77 if($(window).width() < 700) { 78 this.st.focus = false; 79 } else { 80 this.st.focus = '#name'; 81 } 82 } 83 } 84 }); 85 86 /* 87 Ajax 88 */ 89 $('.simple-ajax-popup').magnificPopup({ 90 type: 'ajax', 91 callbacks: { 92 open: function() { 93 $('body').addClass('lightbox-opened'); 94 }, 95 close: function() { 96 $('body').removeClass('lightbox-opened'); 97 } 98 } 99 }); 100 101}).apply( this, [ jQuery ]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.