cms={}; cms.lmenu = function(id) { var m = $('#' + id); m.addclass('lmenu'); m.children().each(function() { $(this).children('a').bind('click', function() { $(this).parent().addclass("lmenu-focus"); $(this).blur(); var li = m.focuselement; if (li && li!=this) { $(li).parent().removeclass("lmenu-focus"); } m.focuselement=this; }); }); } cms.leftli=function(){ $("li").each(function(i){ $(this).removeclass(); if(i==0){ $(this).addclass("leftcurr"); }else{ $(this).addclass("leftnol"); } $(this).click( function () { $("li").each(function(){ $(this).removeclass(); $(this).addclass("leftnol"); }); $(this).removeclass(); $(this).addclass("leftcurr"); }); }); } cms.selectweixintype=function selectweixintype(){ var t=$("#sendtype").val(); if(t==3){ $("#selectimg").show(); $("#imagehelpspan").show(); var img=$("#selectimg").val(); if(img==0){ $("#uploadimgpath4").parent().parent().show(); } }else{ $("#selectimg").hide(); $("#imagehelpspan").hide(); $("#uploadimgpath4").parent().parent().hide(); } } cms.selectweixinimg=function selectweixinimg(){ if($("#selectimg").val()==0){ var t=$("#sendtype").val(); if(t==3){ $("#uploadimgpath4").parent().parent().show(); }else{ $("#uploadimgpath4").parent().parent().hide(); } }else{ $("#uploadimgpath4").parent().parent().hide(); } }