// javascript document jquery(function(){ $(".swiper-wrapper,.swiper-slide").css("height","auto"); }); var owl; $(document).ready(function() { /** $(".more").hover(function(){ this.src="/stage/images/more2.png"; },function(){ this.src="/stage/images/more.png"; }); */ $(".banner #owl-demo").owlcarousel({ autoplay : 3000, stoponhover : true, navigation:true, paginationspeed : 1000, gotofirstspeed : 2000, singleitem : true, autoheight : true, transitionstyle:"fade", nav:true }); owl = $(".banner #owl-demo").data('owlcarousel'); $(".main1bg").find(".media:even").addclass("media1") $(".main1bg").find(".media:odd").addclass("media2") $(".main1bg").find(".media").eq(-1).addclass("media-1") $(".main1bg").find(".media").eq(-2).addclass("media-2") //友情链接 $(".friend_select").each(function(){ var s=$(this); var z=parseint(s.css("z-index")); var dt=$(this).children("dt"); var dd=$(this).children("dd"); var _show=function(){dd.slidedown(200);dt.addclass("cur");s.css("z-index",z+1);}; //展开效果 var _hide=function(){dd.slideup(200);dt.removeclass("cur");s.css("z-index",z);}; //关闭效果 dt.click(function(){dd.is(":hidden")?_show():_hide();}); dd.find("a").click(function(){dt.html($(this).html());_hide();}); //选择效果(如需要传值,可自定义参数,在此处返回对应的"value"值 ) $("body").click(function(i){ !$(i.target).parents(".friend_select").first().is(s) ? _hide():"";}); }) $(".footer_wx").hover(function(){$(this).find(".footer_wximg").show()},function(){$(this).find(".footer_wximg").hide()}); $('.return_top').click(function(){$('html,body').animate({scrolltop:"0px"},800);}); $(".chupin_sanjilist li:last-child").css("background","none") if($(".chupin_textbot").height()>242){ $(".chupin_textbot").height(242).css("overflow","hidden"); } $(".chupin_botbtn").click(function(){ if($(".chupin_textbot").height()>242){ $(".chupin_textbot").height(242).css("overflow","hidden"); $(".chupin_botbtn").html("展开"); }else{ $(".chupin_textbot").height('auto'); $(".chupin_botbtn").html("收起"); } }) $(".chupin_detailbot li:odd").addclass('chupin_botodd'); $(".ser_box1:odd").addclass("ser_box2"); window.onresize=xuanfu; window.onscroll=function(){ if(isrun==false){ settimeout(xuanfu,500); isrun = true; } }; }); var isrun=false; function xuanfu(){ var win = $(window); var xf=$("#xuanfu"); var xf2=$("#xuanfu2"); if(win.width()<1400){ xf.hide(); isrun=false; return; }else{ xf.show(); } if(win.scrolltop()<400){ xf.css("top","700px;"); xf2.css("top","700px;"); }else{ xf.animate({"top":(win.scrolltop()+win.height()/2-100)+"px"},200); xf2.animate({"top":(win.scrolltop()+win.height()/2-100)+"px"},200); } isrun=false; } function submitinfo(){ //提交留言 var name = $("#name").val(); var phone = $("#phone").val(); var education = $("#education").val(); var profession = $("#profession").val(); var target = $("#target").val(); var address = $("#address").val(); var description = $("#description").val(); var retel = /^[0-9]{7,12}$/; if (name == "") { alert("请填写您的姓名"); $("#name").focus(); return; } if (description == "") { $("#description").focus(); alert("请填写您的个人说明"); return; } if (description.length>500) { alert("请控制个人说明的字数"); $("#description").focus();return; } if (retel.test(phone) == false) { $("#phone").focus(); alert("请填写您的联系方式"); return; } $.post("/savejl", { "info.name": name, "info.phone": phone, "info.education": education, "info.profession": profession, "info.target": target, "info.address": address, "info.description": description, }, function(data, textstatus) { if (textstatus == "success") { if(data==-1){ alert("提交过于频繁!"); }else if(data==0){ alert("姓名,联系方式,应聘职位不能为空!"); }else if(data==2){ alert("留言失败,请重试!"); }else{ $("#name").val(""); $("#phone").val(""); $("#education").val(""); $("#profession").val(""); $("#target").val(""); $("#address").val(""); $("#description").val(""); alert("留言已提交!"); } } }); } function stopev(e){ e.stoppropagation(); } function searchkwd(){ var keyword=$("#keywords").val(); location.href="/item/search?keyword="+keyword; } function searchkwd2(){ var keyword=$("#keywords2").val(); location.href="/item/search?keyword="+keyword; } function defaultimg(obj){ obj.src="/stage/images/default_s.jpg"; }