1/** 2 * @package Helix3 Framework 3 * @author JoomShaper http://www.joomshaper.com 4 * @copyright Copyright (c) 2010 - 2016 JoomShaper 5 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later 6 */ 7 8jQuery(function ($) { 9 10 // ************** START Offcarvas *************** // 11 // **************************************************** // 12 if (sp_offanimation == 'default') { 13 //Default 14 $('#offcanvas-toggler').on('click', function (event) { 15 event.preventDefault(); 16 $('.off-canvas-menu-init').addClass('offcanvas'); 17 }); 18 19 $('<div class="offcanvas-overlay"></div>').insertBefore('.offcanvas-menu'); 20 $('.close-offcanvas, .offcanvas-overlay').on('click', function (event) { 21 event.preventDefault(); 22 $('.off-canvas-menu-init').removeClass('offcanvas'); 23 }); 24 } 25 // Slide Top Menu 26 27 if (sp_offanimation == 'slidetop') { 28 $('#offcanvas-toggler').on('click', function (event) { 29 event.preventDefault(); 30 $('.off-canvas-menu-init').addClass('slide-top-menu'); 31 }); 32 33 $('<div class="offcanvas-overlay"></div>').insertBefore('.offcanvas-menu'); 34 $('.close-offcanvas, .offcanvas-overlay').on('click', function (event) { 35 event.preventDefault(); 36 $('.off-canvas-menu-init').removeClass('slide-top-menu'); 37 }); 38 } 39 40 if (sp_offanimation == 'fullscreen') { 41 //Full Screen 42 $('#offcanvas-toggler').on('click', function (event) { 43 event.preventDefault(); 44 $('.off-canvas-menu-init').addClass('full-screen-off-canvas'); 45 }); 46 $(document).ready(function () { 47 $('.off-canvas-menu-init').addClass('full-screen'); 48 }); 49 $('.close-offcanvas, .offcanvas-overlay').on('click', function (event) { 50 event.preventDefault(); 51 $('.off-canvas-menu-init').removeClass('full-screen-off-canvas'); 52 }); 53 } 54 55 if (sp_offanimation == 'fullScreen-top') { 56 //Full screen from top 57 $('#offcanvas-toggler').on('click', function (event) { 58 event.preventDefault(); 59 $('.off-canvas-menu-init').addClass('full-screen-off-canvas-ftop'); 60 }); 61 $(document).ready(function () { 62 $('.off-canvas-menu-init').addClass('full-screen-ftop'); 63 }); 64 $('.close-offcanvas, .offcanvas-overlay').on('click', function (event) { 65 event.preventDefault(); 66 $('.off-canvas-menu-init').removeClass('full-screen-off-canvas-ftop'); 67 }); 68 } 69 70 if (sp_offanimation == 'drarkplus') { 71 //dark with plus 72 $('#offcanvas-toggler').on('click', function (event) { 73 event.preventDefault(); 74 $('.off-canvas-menu-init').addClass('new-look-off-canvas'); 75 }); 76 $('<div class="offcanvas-overlay"></div>').insertBefore('.offcanvas-menu'); 77 $(document).ready(function () { 78 $('.off-canvas-menu-init').addClass('new-look'); 79 }); 80 $('.close-offcanvas,.offcanvas-overlay').on('click', function (event) { 81 event.preventDefault(); 82 $('.off-canvas-menu-init').removeClass('new-look-off-canvas'); 83 }); 84 } 85 86 // ************** END:: Offcarvas *************** // 87 // **************************************************** // 88 89 // ************** START Mega SCRIPT *************** // 90 // **************************************************** // 91 92 //mega menu 93 $('.sp-megamenu-wrapper').parent().parent().css('position', 'static').parent().css('position', 'relative'); 94 $('.sp-menu-full').each(function () { 95 $(this).parent().addClass('menu-justify'); 96 }); 97 98 // boxlayout 99 if ($("body.layout-boxed").length > 0) { 100 var windowWidth = $('#sp-header').parent().outerWidth(); 101 $("#sp-header").css({"width": windowWidth, "left": "auto"}); 102 } 103 104 // if sticky header 105// if ($("body.sticky-header").length > 0) { 106// $(window).on('scroll', function () { 107// if ($(window).scrollTop() > 200){ 108// $("#sp-header").addClass('fixed-header animated fadeInDown'); 109// } else { 110// $("#sp-header").removeClass('fixed-header animated fadeInDown'); 111// } 112// }); 113// } 114 115 // ************** END:: Mega SCRIPT *************** // 116 // **************************************************** // 117 118 // ************** START Feature SCRIPT *************** // 119 // **************************************************** // 120 121 // go to top 122 if (sp_gotop) { 123 // go to top 124 $(window).scroll(function () { 125 if ($(this).scrollTop() > 100) { 126 $('.scrollup').fadeIn(); 127 } else { 128 $('.scrollup').fadeOut(400); 129 } 130 }); 131 132 $('.scrollup').click(function () { 133 $("html, body").animate({ 134 scrollTop: 0 135 }, 600); 136 return false;
137 }); 138 } // has go to top 139 140 // Preloader 141 if (sp_preloader) { 142 $(window).load(function () { 143 if ($('.sp-loader-with-logo').length > 0) { 144 move(); 145 } 146 setTimeout(function () { 147 $('.sp-pre-loader').fadeOut(); 148 }, 1000); 149 }); 150 } // has preloader 151 //preloader Function 152 function move() { 153 var elem = document.getElementById("line-load"); 154 var width = 1; 155 var id = setInterval(frame, 10); 156 function frame() { 157 if (width >= 100) { 158 clearInterval(id); 159 } else { 160 width++; 161 elem.style.width = width + '%'; 162 } 163 } 164 } 165 166 // ************** START Feature SCRIPT *************** // 167 // **************************************************** // 168 169 //template tab 170 $(document).ready(function () { 171 $('.sppb-knight-tab').each(function (index) { 172 var id = 'sppb-knight-tab' + (index + 1); 173 174 $(this).find('.sppb-nav').children().each(function (index) { 175 $(this).find('>a').attr('href', '#' + id + '-' + (index + 1)) 176 }); 177 178 $(this).find('.sppb-tab-content').children().each(function (index) { 179 $(this).attr('id', id + '-' + (index + 1)) 180 }); 181 182 }); 183 }); 184 185 // ************** START Others SCRIPT *************** // 186 // **************************************************** // 187 188 //Tooltip 189 $('[data-toggle="tooltip"]').tooltip(); 190 191 // Article Ajax voting 192 $(document).on('click', '.sp-rating .star', function (event) { 193 event.preventDefault(); 194 195 var data = { 196 'action': 'voting', 197 'user_rating': $(this).data('number'), 198 'id': $(this).closest('.post_rating').attr('id') 199 }; 200 201 var request = { 202 'option': 'com_ajax', 203 'plugin': 'helix3', 204 'data': data, 205 'format': 'json' 206 }; 207 208 $.ajax({ 209 type: 'POST', 210 data: request, 211 beforeSend: function () { 212 $('.post_rating .ajax-loader').show(); 213 }, 214 success: function (response) { 215 var data = $.parseJSON(response.data); 216 217 $('.post_rating .ajax-loader').hide(); 218 219 if (data.status == 'invalid') { 220 $('.post_rating .voting-result').text('You have already rated this entry!').fadeIn('fast'); 221 } else if (data.status == 'false') { 222 $('.post_rating .voting-result').text('Somethings wrong here, try again!').fadeIn('fast'); 223 } else if (data.status == 'true') { 224 var rate = data.action; 225 $('.voting-symbol').find('.star').each(function (i) { 226 if (i < rate) { 227 $(".star").eq(-(i + 1)).addClass('active'); 228 } 229 }); 230 231 $('.post_rating .voting-result').text('Thank You!').fadeIn('fast'); 232 } 233 234 }, 235 error: function () { 236 $('.post_rating .ajax-loader').hide(); 237 $('.post_rating .voting-result').text('Failed to rate, try again!').fadeIn('fast'); 238 } 239 }); 240 }); 241 242 // ************** END:: Others SCRIPT *************** // 243 // **************************************************** // 244 245 246 //Projects slider 247 248 if ($(".projects-sliders").length) { 249 250 var projectSliders = $('.projects-sliders'); 251 252 $('.projects-sliders').owlCarousel({ 253 stagePadding: 183, 254 loop: true, 255 center: true, 256 dots: false, 257 smartSpeed: 500, 258 margin: 0, 259 items: 2, 260 nav: true, 261 navContainer: '#projectSlideCusomNav', 262 navText: ['<span class="fa fa-chevron-left"></span>', '<span class="fa fa-chevron-right"></span>'], 263 autoplay: true, 264 responsive: { 265 0: { 266 items: 1, 267 margin: 0, 268 stagePadding: 0 269 }, 270 480: { 271 items: 1, 272 margin: 0, 273 stagePadding: 0 274 }, 275 550: { 276 items: 2, 277 margin: 0, 278 stagePadding: 80 279 }, 280 768: { 281 items: 1, 282 margin: 0, 283 stagePadding: 0 284 }, 285 992: { 286 items: 2, 287 margin: 0, 288 stagePadding: 80 289 }, 290 1199: { 291 items: 2, 292 margin: 0, 293 stagePadding: 100 294 }, 295 1200: { 296 items: 2, 297 }, 298 1599: { 299 items: 2, 300 stagePadding: 150 301 }, 302 1900: { 303 items: 2, 304 stagePadding: 183 305 } 306 } 307 }); 308 } 309 ; 310 311 //End:: Screenshot slider 312 313 314 315 //Search 316 // var searchRow = $('.top-search-input-wrap').parent().closest('.row'); 317 // $('.top-search-input-wrap').insertAfter(searchRow); 318 319 $(".fa-search").on('click', function () { 320 $(".top-search-input-wrap").fadeIn(400); 321 $(this).hide(); 322 $('.top-search-wrapper').addClass('active'); 323 $('.fa-times').show(); 324 $(".top-search-input-wrap").addClass('active'); 325 }); 326 327 $(".fa-times").on('click', function () { 328 $(".top-search-input-wrap").fadeOut(400); 329 $(this).hide(); 330 $('.top-search-wrapper').removeClass('active'); 331 $('.fa-search').show(); 332 $(".top-search-input-wrap").removeClass('active'); 333 }); 334});
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.