1/** 2 * @package Helix3 Framework 3 * @author JoomShaper https://www.joomshaper.com 4 * @copyright (c) 2010 - 2026 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") 181 .parent() 182 .parent() 183 .css("position", "static") 184 .parent() 185 .css("position", "relative"); 186 $(".sp-menu-full").each(function () { 187 $(this).parent().addClass("menu-justify"); 188 }); 189 190 // boxlayout 191 if ($("body.layout-boxed").length > 0) { 192 var windowWidth = $("#sp-header").parent().outerWidth(); 193 $("#sp-header").css({ "max-width": windowWidth, left: "auto" }); 194 } 195 196 // ************** END:: Mega SCRIPT *************** // 197 // **************************************************** // 198 199 // ************** START Others SCRIPT *************** // 200 // **************************************************** // 201 202 //Tooltip 203 var tooltipTriggerList = [].slice.call( 204 document.querySelectorAll('[data-toggle="tooltip"]'), 205 ); 206 var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) { 207 return new bootstrap.Tooltip(tooltipTriggerEl); 208 }); 209 210 // Article Ajax voting 211 $(document).on("click", ".sp-rating .star", function (event) { 212 event.preventDefault(); 213 214 var data = { 215 action: "voting", 216 user_rating: $(this).data("number"), 217 id: $(this).closest(".post_rating").attr("id"), 218 }; 219 220 var request = { 221 option: "com_ajax", 222 plugin: "helix3", 223 data: data, 224 format: "json", 225 }; 226 var csrfToken = Joomla.getOptions("csrf.token"); 227 if (csrfToken) { 228 request[csrfToken] = 1; 229 } 230 231 $.ajax({ 232 type: "POST", 233 data: request, 234 beforeSend: function () { 235 $(".post_rating .ajax-loader").show(); 236 }, 237 success: function (response) { 238 var data = $.parseJSON(response.data); 239 240 $(".post_rating .ajax-loader").hide(); 241 242 if (data.status == "invalid") { 243 $(".post_rating .voting-result") 244 .text("You have already rated this entry!") 245 .fadeIn("fast"); 246 } else if (data.status == "false") { 247 $(".post_rating .voting-result") 248 .text("Somethings wrong here, try again!") 249 .fadeIn("fast"); 250 } else if (data.status == "true") { 251 var rate = data.action; 252 $(".voting-symbol") 253 .find(".star") 254 .each(function (i) { 255 if (i < rate) { 256 $(".star") 257 .eq(-(i + 1)) 258 .addClass("active"); 259 } 260 }); 261 262 $(".post_rating .voting-result").text("Thank You!").fadeIn("fast"); 263 } 264 }, 265 error: function () { 266 $(".post_rating .ajax-loader").hide(); 267 $(".post_rating .voting-result") 268 .text("Failed to rate, try again!") 269 .fadeIn("fast"); 270 }, 271 }); 272 }); 273 274 // ************** END:: Others SCRIPT *************** // 275 // **************************************************** // 276});
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.