增加一个js函数
This commit is contained in:
@@ -329,4 +329,19 @@ $(function() {
|
||||
}
|
||||
msg.show();
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* 置顶函数
|
||||
* @param {[type]} obj [description]
|
||||
* @return {[type]} [description]
|
||||
*/
|
||||
function go_to_top(obj){
|
||||
var scrTop = $(window).scrollTop();
|
||||
var windowTop = $(window).height();
|
||||
if ((windowTop-300)<scrTop){
|
||||
$("#"+obj).fadeIn("slow");
|
||||
}else{
|
||||
$("#"+obj).fadeOut("slow");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user