//二级导航 $(function(){ $('.nav li').hover(function(){ $(this).children('ul').show(); $(this).children('ul').addclass('animated'); $(this).children('ul').addclass('fadeindown'); },function(){ $(this).children('ul').hide(); } ) }); $(function(){ //调用手机端导航栏目 $('nav#menu').mmenu({ searchfield : true, slidingsubmenus: true }); }); //垂直的二级 $(document).ready(function(){ $('#pane .menuchild:eq(0)').show(); //实现当前菜单收起来 $('#pane h2:eq(0)').addclass('active'); $('#pane h2:eq(0)').addclass('bordernone'); $('#pane h2').click(function(){ $(this).addclass('active').next('.menuchild').slidetoggle(300).siblings('.menuchild').slideup('slow'); $(this).addclass('bordernone'); $(this).siblings().removeclass('active'); $(this).siblings().removeclass('bordernone'); }); }); //添加listpro效果 $(function(){ $('.listpro li').hover(function(){ $(this).addclass('box-shadow'); },function(){ $(this).removeclass('box-shadow'); }) }) //tab选项卡 $(function(){ function tabs(tabtit,on,tabcon){ $(tabcon).each(function(){ $(this).children().eq(0).show(); }); $(tabtit).each(function(){ $(this).children().eq(0).addclass(on); }); $(tabtit).children().click(function(){ $(this).addclass(on).siblings().removeclass(on); var index = $(tabtit).children().index(this); $(tabcon).children().eq(index).show().siblings().hide(); }); } tabs(".tab_title","on",".tab_content"); }) //人才招聘记录展开与收缩 function navlist(id) { var $obj = $("#nav_dot"), $item = $("#j_nav_" + id); $item.addclass("on").parent().removeclass("none").parent().addclass("selected"); $obj.find("span").hover(function () { $(this).addclass("hover"); }, function () { $(this).removeclass("hover"); }); $obj.find("span").click(function () { var $div = $(this).siblings(".zp_con"); if ($(this).parent().hasclass("selected")) { $div.slideup(600); $(this).parent().removeclass("selected"); } if ($div.is(":hidden")) { $("#nav_dot li").find(".zp_con").slideup(600); $("#nav_dot li").removeclass("selected"); $(this).parent().addclass("selected"); $div.slidedown(600); } else { $div.slideup(600); } }); } //首页banner上的滚动文字js (function(a){ function _roll(obj){ this.ele = document.getelementbyid(obj); this.interval = false; this.currentnode = 0; this.passnode = 0; this.speed = 50; this.childs = _childs(this.ele); this.childheight = parseint(_style(this.childs[0])['height']); addevent(this.ele,'mouseover',function(){ window._loveyr.pause(); }); addevent(this.ele,'mouseout',function(){ window._loveyr.start(_loveyr.speed); }); } function _style(obj){ return obj.currentstyle || document.defaultview.getcomputedstyle(obj,null); } function _childs(obj){ var childs = []; for(var i=0;i