1// Freelancer Theme JavaScript 2 3(function($) { 4 "use strict"; // Start of use strict 5 6 // jQuery for page scrolling feature - requires jQuery Easing plugin 7 $('.page-scroll a').bind('click', function(event) { 8 var $anchor = $(this); 9 $('html, body').stop().animate({ 10 scrollTop: ($($anchor.attr('href')).offset().top - 50) 11 }, 1250, 'easeInOutExpo'); 12 event.preventDefault(); 13 }); 14 15 // Highlight the top nav as scrolling occurs 16 $('body').scrollspy({ 17 target: '.navbar-fixed-top', 18 offset: 51 19 }); 20 21 // Closes the Responsive Menu on Menu Item Click 22 $('.navbar-collapse ul li a').click(function(){ 23 $('.navbar-toggle:visible').click(); 24 }); 25 26 // Offset for Main Navigation 27 $('#mainNav').affix({ 28 offset: { 29 top: 100 30 } 31 }) 32 33 // Floating label headings for the contact form 34 $(function() { 35 $("body").on("input propertychange", ".floating-label-form-group", function(e) { 36 $(this).toggleClass("floating-label-form-group-with-value", !!$(e.target).val()); 37 }).on("focus", ".floating-label-form-group", function() { 38 $(this).addClass("floating-label-form-group-with-focus"); 39 }).on("blur", ".floating-label-form-group", function() { 40 $(this).removeClass("floating-label-form-group-with-focus"); 41 }); 42 }); 43 44 //updateCartNo(); 45 46 47 48})(jQuery); // End of use strict 49 50 51function updateCartNo() { 52 53 $.ajax({ 54 type: 'POST', 55 url: '../ajaxcart.php', 56 cache: false, 57 data: { 58 action: 'updatecartno' 59 }, 60 dataType:'json', 61 success: function(data){ 62 if (data.result=="success") { 63 if (data.resulthtml!=0) { 64 $("#cart-empty").hide(); 65 $("#cart-icon").show(); 66 $("#cart-no").html(data.resulthtml); 67 } else { 68 $("#cart-empty").show(); 69 $("#cart-icon").hide(); 70 71 } 72 //console.log(data.resulthtml); 73 //$("#topcartno").html(data.cartno); 74 } 75 76 }, 77 error: function(xhr, status, error) { 78 79 console.log("error"); 80 81 } 82 }); 83} 84 85function openGoogleMap() { 86 window.open("https://www.google.com.hk/maps/place/%E7%92%B0%E6%98%9F%E9%9F%B3%E6%A8%82%E5%9C%8B%E9%9A%9B%E6%9C%89%E9%99%90%E5%85%AC%E5%8F%B8/@22.3071513,114.2223289,17z/data=!4m5!3m4!1s0x34040144efc29b77:0x9d1a6aa073595360!8m2!3d22.307827!4d114.224987?hl=zh-TW", "_blank"); 87 88 89}
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.