/* ============================================================ * index.js 首页js集合 * ============================================================ * Copyright aix. * ============================================================ */ !function($) { // 顶部搜索类型切换 $('.J_sli').click(function() { $(this).addClass('select').siblings().removeClass('select'); var typeValue = $.trim($(this).data('type')); $('#top_search_type').val(typeValue); if(typeValue == 'AIX_jobslist'){ $.getJSON(list_show_type_url,{action:'hotword',type:1}); }else if(typeValue == 'AIX_resumelist'){ $.getJSON(list_show_type_url,{action:'hotword',type:3}); }else if(typeValue == 'AIX_companylist'){ $.getJSON(list_show_type_url,{action:'hotword',type:2}); } }) // 顶部回车搜索 $('#top_search_input').bind('keypress', function(event) { if (event.keyCode == "13") { $("#top_search_btn").click(); } }) // 登录方式切换 $('#forMobileLogin').click(function() { var thisIndex = $(this).data('index'); $('#J_loginType').val(thisIndex); $('.switch_txt').eq(thisIndex).addClass('active').siblings('.switch_txt').removeClass('active'); $('.type_box').eq(thisIndex).addClass('active').siblings('.type_box').removeClass('active'); $('#forAccountLogin').show(); }); $('#forAccountLogin').click(function() { var thisIndex = $(this).data('index'); $('#J_loginType').val(thisIndex); $('.switch_txt').eq(thisIndex).addClass('active').siblings('.switch_txt').removeClass('active'); $('.type_box').eq(thisIndex).addClass('active').siblings('.type_box').removeClass('active'); $('#forAccountLogin').hide(); }); }(window.jQuery);