if (typeof $ != "undefined"){ ;$(function(){ var win = $(window); var isie = !!window.activexobject; var isie6 = isie && !window.xmlhttprequest; var isie8 = isie && !!document.documentmode; var isie7 = isie && !isie6 && !isie8; //隔行变色 $('.even_ul').each(function(){ $(this).children('li:even').addclass('even_li'); }); // //点击高亮 $('.click_ul li').click(function(){ $(this).addclass('on').siblings().removeclass('on'); }); // //标签导航 $(".tab_nav dd a:first").addclass("tab_light"); $(".tab_box > div").hide(); $(".tab_box > div:first").show(); $('.tab_nav dd a').click(function(){ $(this).addclass('tab_light').siblings().removeclass('tab_light'); $(".tab_box > div").hide().eq($('.tab_nav dd a').index(this)).fadein(); }); // // flash if ($().slide) { // $(".ibn").slide({maincell:".bd",titcell:".hd",effect:"leftloop", vis:"auto",autopage: true, autoplay: true, pnloop:true, delaytime: 500, intertime: 5000}); // $(".ibn").slide({maincell:".bd ul",effect:"leftloop",autoplay:true}); // $(".flash").slide({maincell:".bd",titcell:".hd",effect:"leftloop", vis:"auto",autopage: true, autoplay: true, pnloop:true, delaytime: 500, intertime: 5000}); // $(".ann_scroll").slide({maincell:".bd",effect:"top",autopage: true, autoplay: true, pnloop:false, vis:1, intertime: 5000}); // $(".h_tou").slide({maincell:".bd",effect:"leftloop",autopage: true, autoplay: true, pnloop:false, vis:1, intertime: 5000}); // }; // end flash }); //文本框 function placeholder(input){ var placeholder = input.attr("placeholder"), defaultvalue = input.defaultvalue; if(!defaultvalue){ input.val() == "" ? input.val(placeholder).addclass("phcolor") : 0; } input.focus(function(){ input.val() == placeholder ? $(this).val("") : 0; }); input.blur(function(){ input.val() == "" ? $(this).val(placeholder).addclass("phcolor") : 0; }); input.keydown(function(){ $(this).removeclass("phcolor"); }); } ;$(function(){ supportplaceholder="placeholder"in document.createelement("input"); if(!supportplaceholder){ $("input").each(function(){ var type = $(this).attr("type"); text = $(this).attr("placeholder"); if(type == "text" || type == "number" || type == "search" || type == "email" || type == "date" || type == "url"){ placeholder($(this)); } }); } }); //end文本框 $(".list-link dt").click(function(e){ $(".list-link dd").fadeout(); $(this).parent().children("dd").fadein(); e.stoppropagation(); }) $(document.body).click(function(){ $(".list-link dd").fadeout(); }); $(".list-link dd a").click(function(){ var text=$(this).html(); $(this).parent().parent().children("dt")[0].innerhtml=text; // alert($(this).parent().parent().children("dt").html()); }) }; // end jq