From f3fff63632f4856852da37bc37ac7bd4b61449b7 Mon Sep 17 00:00:00 2001 From: molong Date: Mon, 4 Jul 2016 00:25:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B8=80=E4=B8=AAjs=E5=87=BD?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/js/core.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/public/js/core.js b/public/js/core.js index afe6a3cd..92e28589 100644 --- a/public/js/core.js +++ b/public/js/core.js @@ -329,4 +329,19 @@ $(function() { } msg.show(); }; -}); \ No newline at end of file +}); + +/** + * 置顶函数 + * @param {[type]} obj [description] + * @return {[type]} [description] + */ +function go_to_top(obj){ + var scrTop = $(window).scrollTop(); + var windowTop = $(window).height(); + if ((windowTop-300)