//去掉空格 function trim(str, is_global) { var result; result = str.replace(/(^\s+)|(\s+$)/g, ""); if (is_global.tolowercase() == "g") result = result.replace(/\s/g, ""); return result; } //导航下拉 $(function() { $('.g_nav01 table tr td').mouseover(function() { $(this).find('.nav_tan').stop(true, true).slidedown(); $(this).children("a").addclass("cur"); }); $('.g_nav01 table tr td').mouseleave(function() { $(this).find('.nav_tan').stop(true, true).slideup('fast'); $(this).children("a").removeclass("cur"); }); });