1/** 2 * JS for front page 3 */ 4 5( function( $ ) { 6 7 /** 8 * Initiates slick carousel 9 * 10 * @param element css selector 11 * @private 12 */ 13 function __slick( element ) { 14 $( element ).slick( { 15 slidesToShow: 5, 16 arrows: true, 17 prevArrow: '<button type="button" class="slick-prev"><img class="slider-arrow" src="/wp-content/themes/northbike/images/slider-arrow.png" alt="PREV"></button>', 18 nextArrow: '<button type="button" class="slick-next"><img class="slider-arrow" src="/wp-content/themes/northbike/images/slider-arrow.png" alt="NEXT"></button>', 19 dots: false, 20 responsive: [ 21 { 22 23 breakpoint: 1200, 24 settings: { 25 slidesToShow: 4 26 } 27 28 }, 29 { 30 31 breakpoint: 900, 32 settings: { 33 slidesToShow: 3 34 } 35 36 }, 37 { 38 breakpoint: 768, 39 settings: { 40 slidesToShow: 2 41 } 42 }, 43 { 44 breakpoint: 575, 45 settings: { 46 slidesToShow: 1 47 } 48 } 49 ] 50 } ); 51 } 52 53 54 /** 55 * Assign events handlers 56 * 57 * @private 58 */ 59 function __assign() { 60 61 window.onbeforeunload = function() { 62 63 } 64 } 65 66 67 /** 68 * Initialize 69 * 70 * @private 71 */ 72 function __init() { 73 console.info( '[theme] Front page JS initiated!' ); 74 __assign(); 75 document.addEventListener( 'DOMContentLoaded', function() { 76 __slick( '.slick .fl-woocommerce-products .products' ); 77 } ) 78 } 79 80 return { 81 /** 82 * Call to init ourselves 83 */ 84 init: __init 85 } 86} )( jQuery.noConflict() ).init()
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.