From 3935bd644883423a30808cbef8316fffb784c9ff Mon Sep 17 00:00:00 2001 From: Rouslan Placella Date: Tue, 18 Dec 2012 17:16:43 +0000 Subject: [PATCH] Fixed initialisation of the toggleButton on db_events page --- js/functions.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/js/functions.js b/js/functions.js index f3a0c1782c..9d6d06a558 100644 --- a/js/functions.js +++ b/js/functions.js @@ -3021,8 +3021,10 @@ AJAX.registerTeardown('functions.js', function() { */ AJAX.registerOnload('functions.js', function () { $('div.toggleAjax').each(function () { - $(this).show(); - toggleButton($(this)); + var $button = $(this).show(); + $button.find('img').load(function () { + toggleButton($button); + }); }); }); @@ -3679,7 +3681,7 @@ $(function () { * Scrolls the page to the top if clicking the serverinfo bar */ $(function () { - $(document).delegate("#serverinfo, #goto_pagetop", "click", function (event) { + $(document).delegate("#serverinfo, #goto_pagetop", "click", function (event) { event.preventDefault(); $('html, body').animate({scrollTop: 0}, 'fast'); });