$(function () { $(".manangeproperty_03 .prolistwrap li .proindexding a[href='tel:']").hide(); newsindex_01() share() select() setTimeout(function () { $('.manageproperty_02 .swiperwrap li').eq(0).click() }, 100) $('.manageproperty_02 .swiperwrap li').click(function () { $('.manageproperty_02 .swiperwrap li').removeClass('on') $(this).addClass('on') caseAjax($('.manangeproperty_03 ul'), $(this).data('url')) }) $(document).on('click','.recruitlist',function(){ $('.btnwrao .emilbtn').click(function(){ window.location.href = "mailto:"+$(this).href; return false; }) // $('.recruitlist').removeClass("on"); console.log('1'); $(this).find(".listwhide").slideToggle().parents(".recruitlist").siblings().find(".listwhide").slideUp() // $(this).parent('ul').parent('div').addClass("on"); if($(this).hasClass('on')){ console.log('11') $(this).removeClass("on"); }else{ $('.recruitlist').removeClass("on"); $(this).addClass('on') } }) }) function caseAjax(str, url) { if (url.indexOf('?') == -1) { url += '?tm=' + Math.random(); } else { url += '&tm=' + Math.random(); } $.ajax({ url: url, success: function (msg) { $(str).html(""); $(str).append(msg); imgratio(); $(".manangeproperty_03 .prolistwrap li .proindexding a[href='tel:']").hide(); } }); } function newsindex_01() { console.log('111'); var lent = $('.left .swiper-slide').length $('.newsindex_01 .shuzi span:nth-child(3)').text('0' + lent) var swiper = new Swiper('.newsindex_01 .swiper-container', { nextButton: '.newsindex_01 .swiper-button-next', prevButton: '.newsindex_01 .swiper-button-prev', pagination: '.newsindex_01 .swiper-pagination', paginationType: 'progress', onSlideChangeStart: function (swiper) { var activeIndexa = swiper.activeIndex + 1 $('.newsindex_01 .shuzi span:nth-child(1)').text('0' + activeIndexa) $('.newsindex_01 .right .list').removeClass('on') $('.newsindex_01 .right .list').eq(swiper.activeIndex).addClass('on') } }); } //--------------鐐瑰嚮鍒嗕韩 function share() { $(".share_wb").click(function () {//寰崥 var url = $(this).data("txt"); var url = window.location.href; var title = document.title; var op = "http://service.weibo.com/share/share.php?title=" + title + "&url=" + encodeURIComponent(url) + ""; window.open(op) }) $(".share_kj").click(function () {//QQ绌洪棿 var url = $(this).data("txt"); var url = window.location.href; var title = document.title; var op = "https://qzone.qq.com/?url=" + encodeURIComponent(url) + ""; window.open(op); }) $(".share_qq").click(function () {//QQ var url = $(this).data("txt"); var url = window.location.href; var title = document.title; var op = "http://connect.qq.com/widget/shareqq/index.html?url=" + encodeURIComponent(url) + ""; window.open(op); }) $(".share_qqkj").click(function () {//鑵捐寰崥 var url = $(this).data("txt"); var url = window.location.href; var title = document.title; var op = "https://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?title=" + title + "&url=" + encodeURIComponent(url) + ""; window.open(op) }) $(".share_in").click(function () {//linkedin var url = $(this).data("txt"); var url = window.location.href; var title = document.title; var op = "https://www.linkedin.com/uas/login?title=" + title + "&url=" + encodeURIComponent(url) + ""; window.open(op); }) $(".share_zh").click(function () {//鐭ヤ箮 var url = $(this).data("txt"); var url = window.location.href; var title = document.title; var op = "https://www.zhihu.com/signin?next=%2F?title=" + title + "&url=" + encodeURIComponent(url) + ""; window.open(op); }) /*$(".share_bdtb").click(function () {//鐧惧害璐村惂 var url = $(this).data("txt"); var url = window.location.href; var title = document.title; var op = "http://tieba.baidu.com/f/commit/share/openShareApi?title=" + title + "&url=" + encodeURIComponent(url) + ""; window.open(op); }) $(".share_douban").click(function () {//璞嗙摚 var url = $(this).data("txt"); var url = window.location.href; var title = document.title; var op = "https://www.douban.com/share/service?title=" + title + "&url=" + encodeURIComponent(url) + ""; window.open(op); })*/ //寰俊 $(".share_wx").attr("data-qrcode", "http://www.xinhongru.com/qrcode/qrcode.php?content=" + window.location.href); $(".share_wx").click(function () {//寰俊 //var url = "/qrCode/Index.aspx?url=" + window.location.href; var url = $(this).attr("data-qrcode") console.log(url) var title = "" title += "
" title += "x" title += "

浜岀淮鐮?/h2>" title += "
" title += "

鎵竴鎵?/p>" title += "

" $("body").remove(".weixin"); $("body").append(title) }) $(document).on("click", ".weixin .c", function () { $(".weixin").remove(); }) } function select(){ $(".select-box").each(function (i) { $(this).find("dt").click(function (e) { $(this).siblings().slideToggle(); $(this).parents("li").siblings().find("dd").slideUp(); $(this).parents("li").siblings().find("dt").removeClass('on_o'); if($(this).hasClass('on_o')){ $(this).removeClass('on_o'); }else{ $(this).addClass('on_o'); } e.preventDefault(); e.stopPropagation() $(".select-box").eq(i).find("dd a").each(function (x) { $(this).click(function () { $(".select-box").eq(i).find("dd a").removeClass("on"); $(this).addClass("on"); $(".select-box").eq(i).find("dt span").text($(this).text()); }) }) }) }) $(document).click(function () { $(".select-box dd").slideUp(); $(".select-box dt").removeClass('on_o'); }) $(".select-box dt").on("click", function(e){ if($(this).siblings(".select-box dd").is(":hidden")){ $(this).siblings(".select-box dd").slideDown(); }else{ } }); }