$(function () { //���� function dropdownopen() { //�ر�click.bs.dropdown.data-api�¼���ʹ�����˵��ɵ�� $(document).off('click.bs.dropdown.data-api'); var $dropdownli = $('.top-navbar li.dropdown'); $dropdownli.mouseover(function() { $(this).addclass('show'); $(this).children('.dropdown-menu').addclass('show'); }).mouseout(function() { $(this).removeclass('show'); $(this).children('.dropdown-menu').removeclass('show'); }); } function browserredirect() { var suseragent = navigator.useragent.tolowercase(); var bisipad = suseragent.match(/ipad/i) == "ipad"; var bisiphoneos = suseragent.match(/iphone os/i) == "iphone os"; var bismidp = suseragent.match(/midp/i) == "midp"; var bisuc7 = suseragent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4"; var bisuc = suseragent.match(/ucweb/i) == "ucweb"; var bisandroid = suseragent.match(/android/i) == "android"; var bisce = suseragent.match(/windows ce/i) == "windows ce"; var biswm = suseragent.match(/windows mobile/i) == "windows mobile"; if (!(bisipad || bisiphoneos || bismidp || bisuc7 || bisuc || bisandroid || bisce || biswm) ){ dropdownopen(); } } browserredirect(); /** search **/ 'use strict'; var openctrl = document.getelementbyid('btn-search'), closectrl = document.getelementbyid('btn-search-close'), searchcontainer = document.queryselector('.search'), inputsearch = searchcontainer.queryselector('.search__input'); function init() { initevents(); } function initevents() { openctrl.addeventlistener('click', opensearch); closectrl.addeventlistener('click', closesearch); document.addeventlistener('keyup', function(ev) { // escape key. if( ev.keycode == 27 ) { closesearch(); } }); } function opensearch() { searchcontainer.classlist.add('search--open'); inputsearch.focus(); } function closesearch() { searchcontainer.classlist.remove('search--open'); inputsearch.blur(); inputsearch.value = ''; } init(); /****�ײ���ͼ****/ // gl�������ռ�ϊbmapgl // ��ס����ҽ����޸���б�ǻͽƕ� var map = new bmapgl.map("allmap"); // ����mapʵ�� var point= new bmapgl.point(121.88922,29.878043) map.centerandzoom(point, 19); // ��ʼ����ͼ,�������ĵ�����͵�ͼ���� map.enablescrollwheelzoom(true); //�������������� //map.setheading(64.5); //map.settilt(73); var marker = new bmapgl.marker(point); map.addoverlay(marker); /****��ϵ���ǵ�ͼ****/ // gl�������ռ�ϊbmapgl // ��ס����ҽ����޸���б�ǻͽƕ� var map1 = new bmapgl.map("contact-map-1"); // ����mapʵ�� var point1= new bmapgl.point(121.88922,29.878043) map1.centerandzoom(point1, 19); // ��ʼ����ͼ,�������ĵ�����͵�ͼ���� map1.enablescrollwheelzoom(true); //�������������� //map.setheading(64.5); //map.settilt(73); var marker1 = new bmapgl.marker(point1); map1.addoverlay(marker1); var map2 = new bmapgl.map("contact-map-2"); // ����mapʵ�� var point2= new bmapgl.point(121.88922,29.878043) map2.centerandzoom(point2, 19); // ��ʼ����ͼ,�������ĵ�����͵�ͼ���� map2.enablescrollwheelzoom(true); //�������������� //map.setheading(64.5); //map.settilt(73); var marker2 = new bmapgl.marker(point2); map2.addoverlay(marker2); var map3 = new bmapgl.map("contact-map-3"); // ����mapʵ�� var point3= new bmapgl.point(121.654327,29.888317) map3.centerandzoom(point3, 19); // ��ʼ����ͼ,�������ĵ�����͵�ͼ���� map3.enablescrollwheelzoom(true); //�������������� //map.setheading(64.5); //map.settilt(73); var marker3 = new bmapgl.marker(point3); map3.addoverlay(marker3); });