1$(document).ready(function ($) { 2 3 4 //*fixed content height 5 var browserHeight = $(window).height(); 6 var headerHeight = $(".modules-navigation-bar").height(); 7 var footerHeight = $(".modules-sitemap").height() + $(".modules-footer").height(); 8 var articleHeight = browserHeight - headerHeight - footerHeight - 100; //100 = article margin-bottom 9 $(".main-article").attr('style', 'min-height:' + articleHeight + 'px;'); 10 11 12 13 14 15 16 17 18 openVertMenu(); 19 20 //footer - newsletter 21 $("#signup-newsletter").focusin(function () { 22 $(".signup-input-part").addClass("signup-hover") 23 $(".signup-input").addClass("shorten-input"); 24 $(".signup-btn").show(); 25 }); 26 $(window).click(function () { 27 $(".signup-input-part").removeClass("signup-hover") 28 $(".signup-input").removeClass("shorten-input"); 29 $(".signup-btn").hide(); 30 $("#signup-newsletter").val(""); 31 }); 32 $('.signup-input-part').click(function (event) { 33 event.stopPropagation(); 34 }); 35 36 //Subcribe newsletter 37 //press enter 38 $('#signup-newsletter').keypress(function (e) { 39 var key = e.which; 40 if (key == 13) { // the enter key code 41 42 $(".signup-btn").click(); 43 return false; 44 } 45 }); 46 47 48 $(".signup-btn").click(function () { 49 var email = $("#signup-newsletter").val(); 50 51 if (!validateEmail(email)) { 52 submit = false; 53 $(".newsletter-warning").show(); 54 } else { 55 submit = true; 56 $(".newsletter-warning").hide(); 57 } 58 if (submit) { 59 $.ajax({ 60 type: "POST", url: "/index.php?option=com_ajax&module=navicat_ajax&format=raw&method=newsletterSubscribe", 61 dataType: 'json', 62 data: 63 { 64 newsletterVal: email 65 } 66 }).done(function (data) { 67 if (data.result == 1) { 68 location.href = "/company/newsletter"; 69 return; 70 } 71 if (data.result == 2) { 72 location.href = "/company/newsletter-already-subscribed"; 73 return; 74 } 75 /*if ( data.result == 3 ){ 76 77 return; 78 }*/ 79 80 }); 81 82 } 83 }); 84 85 86 87 //MySQL + Postgred, app icon hover effect 88 $("#mysqlIosIcon").mouseover(function () { 89 $(this).attr("src", "/images/02.Product_01_MySQL_AppIcon_hover.png") 90 }); 91 $("#mysqlIosIcon").mouseout(function () { 92 $(this).attr("src", "/images/02.Product_01_MySQL_AppIcon.png") 93 }); 94 $("#postIosIcon").mouseover(function () { 95 $(this).attr("src", "/images/02.Product_01_PostgreSQL_AppIcon_hover.png") 96 }); 97 $("#postIosIcon").mouseout(function () { 98 $(this).attr("src", "/images/02.Product_01_PostgreSQL_AppIcon.png") 99 }); 100 $("#mariadbIosIcon").mouseover(function () { 101 $(this).attr("src", "/images/02.Product_01_MariaDB_AppIcon_hover.png") 102 }); 103 $("#mariadbIosIcon").mouseout(function () { 104 $(this).attr("src", "/images/02.Product_01_MariaDB_AppIcon.png") 105 }); 106 107 108 109 110 111 $(window).resize(function () { 112 var windoWwidth = $(window).width(); 113 /*if (windoWwidth > 972) { 114 closeVertMenu(); 115 $(".close-menu-btn a img").click(); 116 $(".nav-container").removeClass("mobile-nav-container"); 117 }*/ 118 /*if (windoWwidth >= 768) { 119 $(".sitemap-items").addClass("show-items"); 120 $(".sitemap-btn>img").attr("status","off"); 121 $(".sitemap-btn>img").attr("src","/images/00_expand_down_icon.svg"); 122 }else{ 123 $(".sitemap-items").removeClass("show-items"); 124 }*/ 125 }); 126 127 jQuery(".prod-buy-quanity").val("1"); 128 129 $(".sitemap-btn").click(function () { 130 var this_ = $(this).find("img") 131 var this_status = this_.attr("status"); 132 133 if (this_status == "off") { 134 this_.attr("status", "on"); 135 this_.attr("src", "/images/00_expand_up_icon.svg"); 136 this_.parent().parent().parent().parent().find(".sitemap-items").addClass("show-items"); 137 } else { 138 console.log("to off") 139 this_.attr("status", "off"); 140 this_.attr("src", "/images/00_expand_down_icon.svg"); 141 this_.parent().parent().parent().parent().find(".sitemap-items").removeClass("show-items"); 142 } 143 }); 144 145 $(".search-icon img").click(function () { 146 $(".modules-smart-search").toggle(); 147 }); 148 149 $(".search-btn").click(function () { 150 $('.form-search').submit(); 151 }); 152 153 $(".checkbox-label").click(function () { 154 $(this).parent().find("input[type='checkbox']").click(); 155 }); 156
157 $(".show-hide-control > span").click(function () { 158 $(this).parent().toggleClass("show"); 159 $(this).parent().prev(".show-hide-content").toggleClass("show"); 160 }); 161 162 $(".contact_country").click(function () { 163 $(".contact-address2-row, .contact-fax-row, .g-map").hide(); 164 $(".contact_country").removeClass("selected"); 165 var place = $(this).attr("ref"); 166 if (!$(this).hasClass("selected")) { 167 switch (place) { 168 case "hk": 169 $(".contact_country[ref='hk']").addClass("selected"); 170 $("#map_hk").show(); 171 $(".contact-address").html("Unit 1605-1607, Level 16, Tower 1, Grand Century Place, Mongkok, Kowloon, Hong Kong SAR"); 172 $(".contact-num").html("+852 - 2498 3422"); 173 $(".contact-hour").html("9:30 - 18:30 (GMT + 8)"); 174 break; 175 case "cn": 176 $(".contact_country[ref='cn']").addClass("selected"); 177 $("#map_cn").show(); 178 $(".contact-address").html("Unit 607, Tower B, Venture International Park, 2679 Hechuan Road, Shanghai, China (TBC)"); 179 $(".contact-num").html("+86 21 3461 7361"); 180 $(".contact-hour").html("9:30 - 18:30 (GMT + 8)"); 181 break; 182 case "jp": 183 $(".contact_country[ref='jp']").addClass("selected"); 184 $("#map_jp").show(); 185 $(".contact-address").html("Shinjuku i-Land Tower. 22F, 6-5- 1, Nishishinjuku, Shinjuku-ku, Tokyo, 163-1326, Japan"); 186 $(".contact-num").html("03-5354- 5751 (or +81-3- 5354-5751)"); 187 $(".contact-hour").html("9:30 - 18:30 (GMT + 9)"); 188 $(".contact-address2-row, .contact-fax-row").show(); 189 break; 190 } 191 } 192 193 194 }) 195 196 //info-switcher-in-3************************************************************** 197 $(".info-switcher-in3, .info-switcher-in4").click(function () { 198 $(".info-switcher-in3, .info-switcher-in4").removeClass("selected"); 199 $(this).addClass("selected"); 200 $(".info-content").hide(); 201 $(".product-info-features").show(); 202 var os = $(this).attr("os"); 203 switch (os) { 204 case "win": 205 $(".Windows-container").show(); 206 $(".Windows-container").addClass("platform-selected"); 207 $(".system-requirements-table").show(); 208 $(".product-info-table-container").show(); 209 break; 210 case "mac": 211 $(".Mac-container").show(); 212 $(".Mac-container").addClass("platform-selected"); 213 $(".system-requirements-table").show(); 214 $(".product-info-table-container").show(); 215 break; 216 case "linux": 217 $(".Linux-container").show(); 218 $(".Linux-container").addClass("platform-selected"); 219 $(".system-requirements-table").show(); 220 $(".product-info-table-container").show(); 221 break; 222 case "ios": 223 $(".IOS-container").show(); 224 $(".product-info-features").hide(); 225 $(".product-info-table-container").hide(); 226 $(".system-requirements-table").hide(); 227 break; 228 } 229 }); 230 //info-switcher-in-3************************************************************** 231 232 var navigation_bar_height = $(".modules-navigation-bar").height(); 233 var footer_height = $(".modules-sitemap").height() + $(".modules-footer").height(); 234 var window_height = $(window).height(); 235 236 $(window).scroll(function () { 237 scroll_top = $(window).scrollTop(); 238 if (scroll_top >= navigation_bar_height) { 239 $(".sub-navigation-bar-background").addClass("fixed"); 240 $(".sub-navigation-bar-placeholder").show(); 241 } else { 242 $(".sub-navigation-bar-background").removeClass("fixed"); 243 $(".sub-navigation-bar-placeholder").hide(); 244 } 245 if (scroll_top >= 50) { 246 $('.fix-right-bottom-btn').fadeIn(); 247 } else { 248 $('.fix-right-bottom-btn').fadeOut(); 249 } 250 }); 251 252 253 254 if (sessionStorage.getItem("numberOfItem") > 0) { 255 $(".number-of-item").html(sessionStorage.getItem("numberOfItem")).show(); 256 } else { 257 $(".number-of-item").remove(); 258 } 259 260 /*Press*/ 261 var press_pagination = $(".blog .pagination"); 262 press_pagination.wrap("<div class='container pagination-container'></div>") 263 /*press_pagination.find(".pagination-start").html("<span><<</span>"); 264 press_pagination.find(".pagination-prev").html("<span><</span>"); 265 press_pagination.find(".pagination-next").html("<span>></span>"); 266 press_pagination.find(".pagination-end").html("<span>>></span>");*/ 267 $(".blog .show-hide-content").first().addClass("show"); 268 $(".blog .show-hide-control").first().addClass("show"); 269 270 back_to_top(); 271 function back_to_top() { 272 $(".back-to-top-btn").click(function () { 273 $("html, body").animate({ scrollTop: 0 }, "slow"); 274 return false; 275 }); 276 } 277 278 /*function closeVertMenu(){ 279 $(".close-menu-btn a img").click(function(){ 280 281 $(".nav-container").removeClass("mobile-nav-container"); 282 $(".vertical-menu-container").slideUp();
283 $(".search-icon, .cart-icon, .language-icon").show(); 284 setTimeout(function(){ 285 $(".nav-container").removeClass("dark-bg"); 286 $(".navicat-logo>a>img").addClass("m-logo"); 287 288 windoWwidth = $(window).width(); 289 if(windoWwidth < 370) { 290 $(".navicat-logo>a>img").addClass("m-logo"); 291 $(".navicat-logo>a>img").attr("src","/images/00_navicat_logo_small_rainbow.png"); 292 }else{ 293 $(".navicat-logo>a>img").removeClass("m-logo"); 294 $(".navicat-logo>a>img").attr("src","/images/00_navicat_logo_rainbow.svg"); 295 } 296 297 }, 500); 298 }); 299 }*/ 300 301 function openVertMenu() { 302 $(".menu-icon a img").click(function () { 303 $(".navicat-logo>a>img").removeClass("m-logo"); 304 $(".navicat-logo>a>img").attr("src", "/images/00_navicat_logo_white.svg"); 305 $(".nav-container").addClass("mobile-nav-container"); 306 $(".nav-container").addClass("dark-bg"); 307 $(".search-icon, .cart-icon, .language-icon").hide(); 308 309 setTimeout(function () { 310 $(".vertical-menu-container").slideDown(); 311 }, 200); 312 }) 313 } 314 315 $(".sub-navigation-expand-button").click(function () { 316 if ($(this).attr("status") == "closed") { 317 $(this).attr("status", "open") 318 $(this).find("img").attr("src", "../../images/00_SubNaviBar_hide.svg") 319 $(".sub-navigation-bar-background").addClass("expand"); 320 } else { 321 $(this).attr("status", "closed") 322 $(this).find("img").attr("src", "../../images/00_SubNaviBar_expand.svg") 323 $(".sub-navigation-bar-background").removeClass("expand"); 324 } 325 326 }); 327 328 329 330 331 332 $("#freeTrailBtn").click(function () { 333 $.ajax({ 334 type: "POST", url: "/includes/Navicat/industry.php", 335 dataType: 'json', 336 data: 337 { 338 action: "getCompany", 339 industry: $("#industry-select").val(), 340 country: $("#country-select").val() 341 } 342 }).done(function (data) { 343 $(".name-list").empty(); 344 if (data == "none") { 345 $('.name-list').append("<div>æ¾ä¸å°è®°å½ï¼<div>"); 346 } else { 347 $.each(data.result, function (i, item) { 348 var get_industry = "<div class='col-md-4 col-sm-4 col-xs-6'>" + item.company + "</div>"; 349 $('.name-list').append(get_industry); 350 }); 351 } 352 }); 353 }); 354 355 356 /******* Search ******/ 357 if ($("#q").val() == "") { 358 $(".page-container").append("<h2>è¯·å¨æç´¢æ¡ä¸è¾å ¥ä½ çæç´¢åè¯ã</h2>"); 359 } 360 361 362 jQuery(".faq-btn").click(function () { 363 if (jQuery(this).attr("status") == "on") { 364 jQuery(this).attr("status", "off") 365 jQuery(this).find("img").attr("src", "../../images/00_expand_down_icon.svg") 366 jQuery(this).parent().parent().find(".faq-content").hide(); 367 } else { 368 jQuery(this).attr("status", "on") 369 jQuery(this).find("img").attr("src", "../../images/00_hide_up_icon.svg") 370 jQuery(this).parent().parent().find(".faq-content").show(); 371 } 372 }); 373 374 //wechat QR code 375 jQuery(".wechat-small-qr-code-btn").hover(function () { 376 $(".wechat-small-qr-code").addClass("hover"); 377 }, function () { 378 $(".wechat-small-qr-code").removeClass("hover"); 379 } 380 ); 381 382 //footer - show hide wechat QRcode 383 // jQuery(".footer-wechat-btn").click(function() { 384 // jQuery(".footer-wechat-qrcode-container").show(); 385 // }); 386 // jQuery(".footer-wechat-qrcode-cancel-btn").click(function() { 387 // jQuery(".footer-wechat-qrcode-container").hide(); 388 // }); 389 // jQuery(".footer-qr-code-btn").click(function (event) { 390 // event.stopPropagation(); 391 // let qr_code = jQuery(this).find(".media-footer-qr-code") 392 // if (qr_code.hasClass("hover")) { 393 // jQuery(".media-footer-qr-code").removeClass("hover"); 394 // } else { 395 // jQuery(".media-footer-qr-code").removeClass("hover"); 396 // qr_code.addClass("hover"); 397 // } 398 // }); 399 // jQuery(window).click(function () { 400 // jQuery(".media-footer-qr-code").removeClass("hover"); 401 // }); 402 jQuery(".footer-qr-code-btn").hover(function () { 403 jQuery(".media-footer-qr-code").removeClass("hover"); 404 jQuery(this).find(".media-footer-qr-code").addClass("hover"); 405 }, function () { 406 jQuery(".media-footer-qr-code").removeClass("hover"); 407 }); 408}); 409
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.