$(
"#nav a"
).click(
function
(){
var
href = $(
this
).attr(
"href"
);
pos = $(href).offset().top;
"html,body"
).animate({scrollTop: pos}, 1000);
return
false
;
//避免在浏览器原链接后加锚点ID
});