1/** 2 * Vmag Custom JS 3 * 4 * @package VMag 5 * 6 * Distributed under the MIT license - http://opensource.org/licenses/MIT 7 */ 8 9jQuery(document).ready(function($) { 10 "use strict"; 11 12 $('.featuredSlider').lightSlider({ 13 adaptiveHeight:true, 14 item:1, 15 slideMargin:0, 16 enableDrag:false, 17 loop:true, 18 pager:false, 19 auto:true, 20 speed: 700, 21 pause: 4200, 22 onSliderLoad: function() { 23 $('.featuredSlider').removeClass( 'cS-hidden' ); 24 } 25 }); 26 27 $('#vmag-news-ticker').lightSlider({ 28 loop:true, 29 vertical: true, 30 pager:false, 31 auto:true, 32 speed: 600, 33 pause: 3000, 34 enableDrag:false, 35 verticalHeight:80, 36 onSliderLoad: function() { 37 $('#vmag-news-ticker').removeClass( 'cS-hidden' ); 38 } 39 }); 40 41 $('.block-carousel').lightSlider({ 42 pager:false, 43 speed:650, 44 enableDrag:false, 45 responsive : [ 46 { 47 breakpoint:840, 48 settings: { 49 item:2, 50 slideMove:1, 51 slideMargin:6, 52 } 53 }, 54 { 55 breakpoint:480, 56 settings: { 57 item:1, 58 slideMove:1 59 } 60 } 61 ], 62 onSliderLoad: function() { 63 $('.block-carousel').removeClass( 'cS-hidden' ); 64 } 65 }); 66 67 $('.widget-cat-slider').lightSlider({ 68 adaptiveHeight:true, 69 item:1, 70 slideMargin:0, 71 loop:true, 72 controls:false, 73 enableDrag:false, 74 speed: 700, 75 onSliderLoad: function() { 76 $('.widget-cat-slider').removeClass( 'cS-hidden' ); 77 } 78 }); 79 80 $('.vmag-search-in-primary').click(function(event) { 81 $('.vmag-search-form-primary').toggleClass( 'search-in' ); 82 }); 83 84 //Vmag navigation 85 86 $('.nav-toggle').on('vclick click keypress',function (e) { 87 e.preventDefault(); 88 $('.nav-wrapper .menu').slideToggle('slow'); 89 $(this).parent('.nav-wrapper').toggleClass('active'); 90 }); 91 92 jQuery('.nav-wrapper .menu-item-has-children > a,.nav-wrapper .page_item_has_children > a').wrap('<div class="sub-wrap"></div>'); 93 94 95 $('.nav-wrapper .menu-item-has-children .sub-wrap').append('<button type="button" class="sub-toggle"> <i class="fa fa-angle-right"></i> </button>'); 96 $('.nav-wrapper .page_item_has_children .sub-wrap').append('<button type="button" class="sub-toggle-children"> <i class="fa fa-angle-right"></i> </button>'); 97 98 $('.nav-wrapper .sub-toggle').click(function() { 99 $(this).parents('.menu-item-has-children').children('ul.sub-menu').first().slideToggle('1000'); 100 $(this).children('.fa-angle-right').first().toggleClass('fa-angle-down'); 101 }); 102 103 $('.nav-wrapper .sub-toggle-children').click(function() { 104 $(this).parents('.page_item_has_children').children('ul.children').first().slideToggle('1000'); 105 $(this).children('.fa-angle-right').first().toggleClass('fa-angle-down'); 106 }); 107 108 109 // Widget tabbed 110 $('.vmag-cat-tabs').each(function(){ 111 $(this).find('.cat-tab:first').addClass('active'); 112 }); 113 114 $('.vmag-tabbed-wrapper').each(function(){ 115 $(this).find('.vmag-tabbed-section:first').show(); 116 }); 117 118 $('#vmag-widget-tabbed li a').click(function(event) { 119 var tabId = $(this).attr('id'); 120 $('.vmag-tabbed-section').hide(); 121 $('#section-'+tabId).show(); 122 $('.cat-tab').removeClass('active'); 123 $(this).parent('li').addClass('active'); 124 }); 125 126 127 var WowOptionVal = vmag_custom_loc.mode; 128 // var WowOptionVal = WowOption.mode; 129 if( WowOptionVal == 'enable' && $('body').hasClass('home') ) { 130 new WOW().init(); 131 } 132 133 //Top up arrow 134 $("#scroll-up").hide(); 135 $(function () { 136 $(window).scroll(function () { 137 if ($(this).scrollTop() > 1000) { 138 $('#scroll-up').fadeIn(); 139 } else { 140 $('#scroll-up').fadeOut(); 141 } 142 }); 143 $('a#scroll-up').click(function () { 144 $('body,html').animate({ 145 scrollTop: 0 146 }, 800); 147 return false; 148 }); 149 }); 150 151 var date_show = vmag_custom_loc.date; 152 153 if(date_show == 'show') { 154 155 /*Time*/ 156 var myVar = setInterval(function() { 157 vmagTime(); 158 }, 100); 159 160 function vmagTime() { 161 var d = new Date(); 162 document.getElementById("time").innerHTML = d.toLocaleTimeString(); 163 } 164 } 165 166 167});
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.