1/** 2 * Square Custom JS 3 * 4 * @package square 5 * 6 * Distributed under the MIT license - http://opensource.org/licenses/MIT 7 */ 8 9jQuery(function ($) { 10 11 $('#sq-bx-slider').owlCarousel({ 12 autoplay: true, 13 items: 1, 14 loop: true, 15 nav: true, 16 dots: false, 17 autoplayTimeout: 7000, 18 animateOut: 'fadeOut', 19 navText: ['<i class="fas fa-chevron-left"></i>', '<i class="fas fa-chevron-right"></i>'] 20 }); 21 22 $(".sq_client_logo_slider").owlCarousel({ 23 autoplay: true, 24 items: 5, 25 loop: true, 26 nav: false, 27 dots: false, 28 autoplayTimeout: 7000, 29 responsive: { 30 0: { 31 items: 2, 32 }, 33 768: { 34 items: 3, 35 }, 36 979: { 37 items: 4, 38 }, 39 1200: { 40 items: 5, 41 } 42 } 43 }); 44 45 $(".sq-tab-pane:first").show(); 46 $(".sq-tab li:first").addClass('sq-active'); 47 48 $(".sq-tab li a").click(function () { 49 var tab = $(this).attr('href'); 50 $(".sq-tab li").removeClass('sq-active'); 51 $(this).parent('li').addClass('sq-active'); 52 $(".sq-tab-pane").hide(); 53 $(tab).show(); 54 return false; 55 }); 56 57 $(window).scroll(function () { 58 var scrollTop = $(window).scrollTop(); 59 if (scrollTop > 0) { 60 $('#sq-masthead').addClass('sq-scrolled'); 61 } else { 62 $('#sq-masthead').removeClass('sq-scrolled'); 63 } 64 }); 65 66 $('.sq-menu > ul').superfish({ 67 delay: 500, 68 animation: {opacity: 'show', height: 'show'}, 69 speed: 'fast' 70 }); 71 72 $('.sq-toggle-nav').click(function () { 73 $('#sq-site-navigation').slideToggle(); 74 squareKeyboardLoop($('.sq-main-navigation')); 75 return false; 76 }); 77 78 var squareKeyboardLoop = function (elem) { 79 80 var tabbable = elem.find('select, input, textarea, button, a').filter(':visible'); 81 82 var firstTabbable = tabbable.first(); 83 var lastTabbable = tabbable.last(); 84 /*set focus on first input*/ 85 firstTabbable.focus(); 86 87 /*redirect last tab to first input*/ 88 lastTabbable.on('keydown', function (e) { 89 if ((e.which === 9 && !e.shiftKey)) { 90 e.preventDefault(); 91 firstTabbable.focus(); 92 } 93 }); 94 95 /*redirect first shift+tab to last input*/ 96 firstTabbable.on('keydown', function (e) { 97 if ((e.which === 9 && e.shiftKey)) { 98 e.preventDefault(); 99 lastTabbable.focus(); 100 } 101 }); 102 103 /* allow escape key to close insiders div */ 104 elem.on('keyup', function (e) { 105 if (e.keyCode === 27) { 106 elem.hide(); 107 } 108 ; 109 }); 110 }; 111 112}); 113 114if (jQuery('#sq-elasticstack').length > 0) { 115 new ElastiStack(document.getElementById('sq-elasticstack'), { 116 // distDragBack: if the user stops dragging the image in a area that does not exceed [distDragBack]px 117 // for either x or y then the image goes back to the stack 118 distDragBack: 200, 119 // distDragMax: if the user drags the image in a area that exceeds [distDragMax]px 120 // for either x or y then the image moves away from the stack 121 distDragMax: 450, 122 // callback 123 onUpdateStack: function (current) { 124 return false; 125 } 126 }); 127}
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.