/设置页面高度/ function getiframeheight(){ $("#contain").load(function(){ var mainheight = $(this).contents().find("body").innerheight(); $(this).height(mainheight); $("#collect").load(function(){ var collectheight = $(this).contents().find("body").innerheight(); $(this).height(collectheight+47); }) }); } /**tab切换**/ function tabs($obj){ var tabmenu = $obj.children().eq(0); var tabbody = $obj.children().eq(1); tabmenu.find("li").click(function(){ var i = $(this).index(); $(this).addclass("selected").siblings("").removeclass("selected"); tabbody.children(".tab-body-panel").eq(i).show().siblings("").hide() }); } function tittabs(){ var tabmenu = $('.j_tab').find('.tab-header'); tabmenu.children('li').click(function(){ var i = $(this).index(); $(this).addclass('active').siblings('li').removeclass('active'); $(this).parents('.j_tab').children('.tab-body').children('.tab-body-panel').eq(i).show().siblings('.tab-body-panel').hide(); }); } //身份认证输入框 focus function iptfocus(obj) { var _val = obj.val(); obj.focusin(function () { $(this).val(""); }); obj.focusout(function () { if ($(this).val() == ""||$(this).val()==null) { $(this).val(_val); } }); } function btnclick(obj){ obj.find("li").click(function(){ $(this).addclass("active").siblings("li").removeclass("active"); }) } function btnclose(){ $(".close").click(function(){ $(this).parent(".ad").hide(); }) } /**点击收缩/展开左侧区**/ function jsfortaggle(){ $(".btn_taggle").toggle( function(){ var conleft = $(this).parents(".contentleft"); //conleft.height(window.innerheight); conleft.css("width","0px"); conleft.children().not(".btn_taggle").hide(); $(this).css("right","0px"); $(".contentright").css({ "marginleft": "6px" }); $(this).removeclass("btn_pic_left").addclass("btn_pic_right"); }, function(){ var conleft = $(this).parents(".contentleft"); conleft.css("width","165px"); conleft.children().show(); $(this).css("right","-12px"); $(".contentright").css({ "marginleft":180 }); $(this).removeclass("btn_pic_right").addclass("btn_pic_left"); } ); } /**给jquery节点设置高度**/ function setheight(_obj, vheight) { var wheight = $(window).height(); if ($.browser.msie) { if ($.browser.version == "6.0") { vheight = vheight+1; } } _obj.height(wheight - vheight); }