From f525acf3d70b847f88b95596787fd25cf7e2fdbe Mon Sep 17 00:00:00 2001 From: "J.M" Date: Wed, 5 Dec 2012 17:44:40 +0100 Subject: [PATCH] Scroll the page to the top if clicking the serverinfo bar --- js/functions.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/js/functions.js b/js/functions.js index 8492f17e70..7f046177a1 100644 --- a/js/functions.js +++ b/js/functions.js @@ -3669,6 +3669,18 @@ $(function () { } }); +/** + * Scrolls the page to the top if clicking the serverinfo bar + */ +$(function () { + $(document).delegate("#serverinfo", "click", function () { + $('html, body').animate({scrollTop: 0}, 'fast'); + }); + $(document).delegate("#serverinfo > *", "click", function (e) { + e.stopPropagation(); + }); +}); + /** * Watches checkboxes in a form to set the checkall box accordingly */