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