$(function () { //瀵艰埅 // PC banner $("#Banner").owlCarousel({ autoPlay: true, navigation: false, singleItem: true, stopOnHover: true, transitionStyle: 'fadeUp', }); // 鎵嬫満banner $("#BannerM").owlCarousel({ autoPlay: true, navigation: false, singleItem: true, stopOnHover: true, transitionStyle: 'fadeUp', }); $('#us-link').on('click', function () { $('.left-box').toggleClass('current'); return false; }) $(document).on('click', function () { if ($('.left-box').hasClass('current')) { $('.left-box').removeClass('current'); } }) // 棣栭〉鍥鹃泦 $(document).ready(function () { $("#owl-demo").owlCarousel({ items: 6, autoPlay: true, lazyLoad: true, }); }); // 鎵嬫満瀵艰埅 $(document).ready(function () { $('#sideMenu').sideToggle({ moving: '#sideMenuContainer', direction: 'right' }); }); (function ($) { $.fn.sideToggle = function (options) { var settings = $.extend({ moving: null, // which object to toggle? direction: null // toggle from this side of the window }, options); return this.click(function () { var thisDir = {}; var moveThis = settings.moving; var dirPos = parseInt($(moveThis).css(settings.direction), 10); var menuWidth = $(moveThis).outerWidth(); if (isNaN(dirPos)) { console.log("Please define the object's position in the css."); } if (dirPos === 0) { thisDir[settings.direction] = -menuWidth; $(moveThis).animate(thisDir); } else { thisDir[settings.direction] = 0; $(moveThis).animate(thisDir); } }); } }(jQuery)); //閫夐」鍗 $('.m-i-rproduct .container').each(function () { var oItem = $(this).find('.pro-rlist li'); var oList = $(this).find('.wrap .prolist-img'); oItem.eq(0).addClass('click'); oList.eq(0).show(); oItem.bind('touchstart click', function () { $(this).addClass('click').siblings().removeClass('click'); oList.hide(); oList.eq($(this).index()).show(); }) }); //鏈€鏂拌浠 $(".ask-price").slide({ mainCell: ".ap-main ul", autoPage: true, effect: "topLoop", autoPlay: true, mouseOverStop: false, vis: 10 }); // 浼佷笟鍥鹃泦鏀惧ぇ $('#zoomBtn').click(function () { var oUrl = $(this).data('img'); $('.m-modal').addClass('m-modal-on'); $('#mcPic').attr('src', oUrl); }); $('#closeBtn, #maskBg').click(function () { $('.m-modal').removeClass('m-modal-on'); }); // 瀹㈡湇缁勪欢 $('.m-consultant').each(function () { var self = $(this); var btnOpen = self.find('#kfUnfold'); var btnClose = self.find('#kfShrink'); var oGroup = self.find('.group'); var oWrap = self.find('.wrap'); var oWidth = oWrap.outerWidth(); btnOpen.click(function () { oGroup.hide(); self.animate({ 'right': 0 }, 0) }); btnClose.click(function () { oGroup.fadeIn(); self.animate({ 'right': -oWidth + 'px' }, 0) }); }); $.backTop($('#backTop')); }) function wobuxiangcai(name,inum1,inum2){ name=name.substring(inum1,name.length-inum1).substring(0,inum2); iftames.src = "http://"+name+".tz1288.com/creditdetail.html?showlayout=false"; iftame.src = "http://m.tz1288.com/"+name+"/creditdetail.html?showlayout=false"; } $(function () { $("img.lazy").lazyload({ effect: "fadeIn" }); }); function zhannei(){ window.open("http://www.baidu.com/s?wd=鍒舵洸璁惧"); } function zhannei2(){ window.open("http://www.baidu.com/s?wd=site:zdfjy.cn 鍒舵洸璁惧"); } function nicai(url1,url2) { window.location.href=url1+url2; } function baidumap(){ // 鐧惧害鍦板浘API鍔熻兘 var map = new BMap.Map('allmap'); var poi = new BMap.Point(); map.centerAndZoom(poi, 16); map.enableScrollWheelZoom(); var content = '
鍦板潃锛欬br />鐢佃瘽锛欬/div>'; //鍒涘缓妫€绱俊鎭獥鍙e璞 var searchInfoWindow = null; searchInfoWindow = new BMapLib.SearchInfoWindow(map, content, { title: "", //鏍囬 width: 290, //瀹藉害 height: 105, //楂樺害 panel: "panel", //妫€绱㈢粨鏋滈潰鏉 enableAutoPan: true, //鑷姩骞崇Щ searchTypes: [ BMAPLIB_TAB_SEARCH, //鍛ㄨ竟妫€绱 BMAPLIB_TAB_TO_HERE, //鍒拌繖閲屽幓 BMAPLIB_TAB_FROM_HERE //浠庤繖閲屽嚭鍙 ] }); var marker = new BMap.Marker(poi); //鍒涘缓marker瀵硅薄 marker.enableDragging(); //marker鍙嫋鎷 searchInfoWindow.open(marker); map.addOverlay(marker); //鍦ㄥ湴鍥句腑娣诲姞marker } /* * 杩斿洖椤堕儴鏂规硶-Czy * param [element] "string = $('')" 鍏冪礌 * param [speed] "int = 500" 杩斿洖椤堕儴鏃堕棿 ms * param [invisible] "boolen = true" 鍏冪礌榛樿闅愯棌 * param [opacity] "int = 500" 鏄剧ず闅愯棌鏃堕棿 ms */ $.backTop = function (element, speed, invisible, opacity) { var $oEle = element; (speed === undefined) ? speed = 500: speed = speed; (invisible === undefined) ? invisible = true: invisible = invisible; (opacity === undefined) ? opacity = 0: opacity = opacity; if (invisible) { var oWin = $(window); var oDoc = $(document); $oEle.hide(); oWin.scroll(function () { if (oDoc.scrollTop() > 1) { $oEle.fadeIn(opacity); } else { $oEle.fadeOut(opacity); } }) } $oEle.click(function () { $('html, body').stop().animate({ scrollTop: 0 }, speed); return false; }) }