1/** 2 * @package Helix3 Framework 3 * @author JoomShaper http://www.joomshaper.com 4 * @copyright Copyright (c) 2010 - 2017 JoomShaper 5 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later 6 */ 7 8jQuery(function ($) { 9 10 // ************ START Helix 1.4 JS ************** // 11 // **************************************************** // 12 13 //Default 14 if (typeof sp_offanimation === 'undefined' || sp_offanimation === '') { 15 sp_offanimation = 'default'; 16 } 17 18 if (sp_offanimation == 'default') { 19 $('#offcanvas-toggler').on('click', function (event) { 20 event.preventDefault(); 21 $('.off-canvas-menu-init').addClass('offcanvas'); 22 }); 23 24 $('<div class="offcanvas-overlay"></div>').insertBefore('.offcanvas-menu'); 25 $('.close-offcanvas, .offcanvas-overlay').on('click', function (event) { 26 event.preventDefault(); 27 $('.off-canvas-menu-init').removeClass('offcanvas'); 28 }); 29 } 30 31 // Slide Top Menu 32 if (sp_offanimation == 'slidetop') { 33 $('#offcanvas-toggler').on('click', function (event) { 34 event.preventDefault(); 35 $('.off-canvas-menu-init').addClass('slide-top-menu'); 36 }); 37 38 $('<div class="offcanvas-overlay"></div>').insertBefore('.offcanvas-menu'); 39 $('.close-offcanvas, .offcanvas-overlay').on('click', function (event) { 40 event.preventDefault(); 41 $('.off-canvas-menu-init').removeClass('slide-top-menu'); 42 }); 43 } 44 45 //Full Screen 46 if (sp_offanimation == 'fullscreen') { 47 $('#offcanvas-toggler').on('click', function (event) { 48 event.preventDefault(); 49 $('.off-canvas-menu-init').addClass('full-screen-off-canvas'); 50 }); 51 $(document).ready(function () { 52 $('.off-canvas-menu-init').addClass('full-screen'); 53 }); 54 $('.close-offcanvas, .offcanvas-overlay').on('click', function (event) { 55 event.preventDefault(); 56 $('.off-canvas-menu-init').removeClass('full-screen-off-canvas'); 57 }); 58 } 59 60 //Full screen from top 61 if (sp_offanimation == 'fullScreen-top') { 62 $('#offcanvas-toggler').on('click', function (event) { 63 event.preventDefault(); 64 $('.off-canvas-menu-init').addClass('full-screen-off-canvas-ftop'); 65 }); 66 $(document).ready(function () { 67 $('.off-canvas-menu-init').addClass('full-screen-ftop'); 68 }); 69 $('.close-offcanvas, .offcanvas-overlay').on('click', function (event) { 70 event.preventDefault(); 71 $('.off-canvas-menu-init').removeClass('full-screen-off-canvas-ftop'); 72 }); 73 } 74 75 //Dark with plus 76 if (sp_offanimation == 'drarkplus') { 77 $('#offcanvas-toggler').on('click', function (event) { 78 event.preventDefault(); 79 $('.off-canvas-menu-init').addClass('new-look-off-canvas'); 80 }); 81 $('<div class="offcanvas-overlay"></div>').insertBefore('.offcanvas-menu'); 82 $(document).ready(function () { 83 $('.off-canvas-menu-init').addClass('new-look'); 84 }); 85 $('.close-offcanvas,.offcanvas-overlay').on('click', function (event) { 86 event.preventDefault(); 87 $('.off-canvas-menu-init').removeClass('new-look-off-canvas'); 88 }); 89 } 90 91 // if sticky header 92 if ($("body.sticky-header").length > 0) { 93 var fixedSection = $('#sp-header'); 94 // sticky nav 95 var headerHeight = fixedSection.outerHeight(); 96 var stickyNavTop = fixedSection.offset().top; 97 fixedSection.addClass('animated'); 98 //add class 99 fixedSection.addClass('menu-fixed-out'); 100 var stickyNav = function () { 101 var scrollTop = $(window).scrollTop(); 102 if (scrollTop > stickyNavTop) { 103 fixedSection.removeClass('menu-fixed-out').addClass('menu-fixed'); 104 } else { 105 if (fixedSection.hasClass('menu-fixed')) { 106 fixedSection.removeClass('menu-fixed').addClass('menu-fixed-out'); 107 } 108 } 109 }; 110 stickyNav(); 111 $(window).scroll(function () { 112 stickyNav(); 113 }); 114 } 115 // go to top 116 if (typeof sp_gotop === 'undefined') { 117 sp_gotop = ''; 118 } 119 120 if (sp_gotop) { 121 // go to top 122 $(window).scroll(function () { 123 if ($(this).scrollTop() > 100) { 124 $('.scrollup').fadeIn(); 125 } else { 126 $('.scrollup').fadeOut(400); 127 } 128 }); 129 130 $('.scrollup').click(function () { 131 $("html, body").animate({ 132 scrollTop: 0 133 }, 600); 134 return false;
135 }); 136 } // has go to top 137 138 // Preloader 139 if (typeof sp_preloader === 'undefined') { 140 sp_preloader = ''; 141 } 142 143 if (sp_preloader) { 144 $(window).on('load', function () { 145 if ($('.sp-loader-with-logo').length > 0) { 146 move(); 147 } 148 setTimeout(function () { 149 $('.sp-pre-loader').fadeOut(); 150 }, 1000); 151 }); 152 } // has preloader 153 //preloader Function 154 function move() { 155 var elem = document.getElementById("line-load"); 156 var width = 1; 157 var id = setInterval(frame, 10); 158 function frame() { 159 if (width >= 100) { 160 clearInterval(id); 161 } else { 162 width++; 163 elem.style.width = width + '%'; 164 } 165 } 166 } 167 // ************ END:: Helix 1.4 JS ************** // 168 // **************************************************** // 169 170 // ************** START Mega SCRIPT *************** // 171 // **************************************************** // 172 173 //mega menu 174 $('.sp-megamenu-wrapper').parent().parent().css('position', 'static').parent().css('position', 'relative'); 175 $('.sp-menu-full').each(function () { 176 $(this).parent().addClass('menu-justify'); 177 }); 178 179 // boxlayout 180 if ($("body.layout-boxed").length > 0) { 181 var windowWidth = $('#sp-header').parent().outerWidth(); 182 $("#sp-header").css({"max-width": windowWidth, "left": "auto"}); 183 } 184 185 // ************** END:: Mega SCRIPT *************** // 186 // **************************************************** // 187 188 // ************** START Others SCRIPT *************** // 189 // **************************************************** // 190 191 //Tooltip 192 $('[data-toggle="tooltip"]').tooltip(); 193 194 // Article Ajax voting 195 $(document).on('click', '.sp-rating .star', function (event) { 196 event.preventDefault(); 197 198 var data = { 199 'action': 'voting', 200 'user_rating': $(this).data('number'), 201 'id': $(this).closest('.post_rating').attr('id') 202 }; 203 204 var request = { 205 'option': 'com_ajax', 206 'plugin': 'helix3', 207 'data': data, 208 'format': 'json' 209 }; 210 211 $.ajax({ 212 type: 'POST', 213 data: request, 214 beforeSend: function () { 215 $('.post_rating .ajax-loader').show(); 216 }, 217 success: function (response) { 218 var data = $.parseJSON(response.data); 219 220 $('.post_rating .ajax-loader').hide(); 221 222 if (data.status == 'invalid') { 223 $('.post_rating .voting-result').text('You have already rated this entry!').fadeIn('fast'); 224 } else if (data.status == 'false') { 225 $('.post_rating .voting-result').text('Somethings wrong here, try again!').fadeIn('fast'); 226 } else if (data.status == 'true') { 227 var rate = data.action; 228 $('.voting-symbol').find('.star').each(function (i) { 229 if (i < rate) { 230 $(".star").eq(-(i + 1)).addClass('active'); 231 } 232 }); 233 234 $('.post_rating .voting-result').text('Thank You!').fadeIn('fast'); 235 } 236 237 }, 238 error: function () { 239 $('.post_rating .ajax-loader').hide(); 240 $('.post_rating .voting-result').text('Failed to rate, try again!').fadeIn('fast'); 241 } 242 }); 243 }); 244 245 // ************** END:: Others SCRIPT *************** // 246 // **************************************************** // 247 248 //FAQ page carousel 249 $(window).on('load', function () { 250 $('.sppb-panel').first().addClass('active'); 251 }); 252 $('.sppb-panel-heading').on('click', function () { 253 $('.sppb-panel.active').removeClass('active'); 254 $(this).parent('.sppb-panel').addClass('active'); 255 }); 256 257});
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.