if ($('#back-to-top').length) { var scrollTrigger = 100, // px backToTop = function () { var scrollTop = $(window).scrollTop(); if (scrollTop > scrollTrigger) { $('#back-to-top').addClass('show'); } else { $('#back-to-top').removeClass('show'); } }; backToTop(); $(window).on('scroll', function () { backToTop(); }); $('#back-to-top').on('click', function (e) { e.preventDefault(); $('html,body').animate({ scrollTop: 0 }, 700); }); } $('#HiddenMembersSection').hide() $('#ActiveMember').click(function() { $('#HiddenMembersSection').fadeOut(200); $('#TeamMembers').fadeIn(400); $(this).removeClass("TeamControl"); $(this).addClass("TeamControl-Active"); $('#HiddenMember').removeClass("TeamControl-Active"); $('#HiddenMember').addClass("TeamControl"); }); $('#HiddenMember').click(function() { $('#TeamMembers').fadeOut(200); $('#HiddenMembersSection').fadeIn(400); $(this).removeClass("TeamControl"); $(this).addClass("TeamControl-Active"); $('#ActiveMember').removeClass("TeamControl-Active"); $('#ActiveMember').addClass("TeamControl"); }); $('.Scroll-CloseBTN').click(function() { $('.ScrollSection').fadeOut(); }); // Scroll Funcation show Div $(window).on('scroll', function() { if (checkVisible($('.ScrollIn'))) { $('.ScrollSection').fadeIn(); $(window).off('scroll'); } else { // do nothing } }); function checkVisible(elm, eval) { eval = eval || "object visible"; var viewportHeight = $(window).height(), // Viewport Height scrolltop = $(window).scrollTop(), // Scroll Top y = $(elm).offset().top, elementHeight = $(elm).height(); if (eval == "object visible") return ((y < (viewportHeight + scrolltop)) && (y > (scrolltop - elementHeight))); if (eval == "above") return ((y < (viewportHeight + scrolltop))); } // Google Map Settings var locations = [ ['2/F, 135 Bonham Strand Trade Centre,
Bonham Strand (MTR Exit A2),
Sheung Wan', 22.286669, 114.149313], ['Unit 6H, Kings Wing Plaza I,
3 On Kwan Street,
Shek Mun (MTR Exit C), Sha Tin', 22.388053, 114.208031] ]; var map = new google.maps.Map(document.getElementById('google-map'), { scrollwheel: false, navigationControl: false, mapTypeControl: false, scaleControl: false, draggable: true, zoom: 11, center: new google.maps.LatLng(22.340870, 114.179991), gestureHandling: 'cooperative', mapTypeId: google.maps.MapTypeId.ROADMAP, }); var infowindow = new google.maps.InfoWindow(); var marker, i; for (i = 0; i < locations.length; i++) { marker = new google.maps.Marker({ position: new google.maps.LatLng(locations[i][1], locations[i][2]), map: map }); google.maps.event.addListener(marker, 'click', (function(marker, i) { return function() { infowindow.setContent(locations[i][0]); infowindow.open(map, marker); } })(marker, i)); }