From b1b2785a1527569853017e97f9f8d4f239cc20ce Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Sun, 14 Jul 2013 22:26:40 +0000 Subject: [PATCH] update main menu highlighting --- source/Ox.UI/js/Menu/MainMenu.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/Ox.UI/js/Menu/MainMenu.js b/source/Ox.UI/js/Menu/MainMenu.js index 73bcd17f..0280d875 100644 --- a/source/Ox.UI/js/Menu/MainMenu.js +++ b/source/Ox.UI/js/Menu/MainMenu.js @@ -203,9 +203,11 @@ Ox.MainMenu = function(options, self) { that.highlightMenu = function(id) { var position = Ox.getIndexById(self.options.menus, id); + self.highlightTimeout && clearTimeout(self.highlightTimeout); that.titles[position].addClass('OxSelected'); - setTimeout(function() { + self.highlightTimeout = setTimeout(function() { that.titles[position].removeClass('OxSelected'); + delete self.highlightTimeout; }, 250); };