1/** 2 * Theme scripts. 3 * Includes all the script functions for this theme. 4 */ 5 6/* window.onscroll = function() {myFunction()}; 7 8var header = document.getElementById("nav-wrapper"); 9var sticky = header.offsetTop; 10 11function myFunction() { 12 if (window.pageYOffset >= sticky) { 13 header.classList.add("sticky-nav"); 14 } else { 15 header.classList.remove("sticky-nav"); 16 } 17} */ 18 19 20 // owlCarousel 21( function( $ ) { 22 'use strict'; 23 24 // Global 25 var $doc = $( document ), 26 $body = $( 'body' ); 27 28 function caliOwlCarousel() { 29 if ( $.fn.owlCarousel ) { 30 31 // Article Carousel/Slider 32 $( '.owlslider' ).each( function() { 33 $( this ).owlCarousel({ 34 loop: true, 35 margin: 10, 36 nav: true, 37 dots: false, 38 autoplay: true, 39 autoplayHoverPause: true, 40 responsiveClass: true, 41 responsive:{ 42 0:{ 43 items: 2, 44 margin: 5 45 }, 46 768:{ 47 items: 3, 48 margin: 10 49 }, 50 1200:{ 51 items: 4 52 } 53 } 54 }); 55 } ); 56 } 57 } 58 59 /* Function init */ 60 $doc.ready( function() { 61 caliOwlCarousel(); 62 } ); 63 64 65 66 // ScrollUp 67 $(function($) { 68 var goTop = $('#back-to-top'); 69 $(window).scroll(function() { 70 if ( $(this).scrollTop() > 600 ) { 71 goTop.addClass('show'); 72 } else { 73 goTop.removeClass('show'); 74 } 75 }); 76 77 goTop.on('click', function() { 78 $("html, body").animate({ scrollTop: 0 }, 1000); 79 return false; 80 }); 81}); 82 83 84 85} )( 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.