update main menu highlighting

This commit is contained in:
rlx 2013-07-14 22:26:40 +00:00
parent d9dfa9f0c6
commit b1b2785a15

View file

@ -203,9 +203,11 @@ Ox.MainMenu = function(options, self) {
that.highlightMenu = function(id) { that.highlightMenu = function(id) {
var position = Ox.getIndexById(self.options.menus, id); var position = Ox.getIndexById(self.options.menus, id);
self.highlightTimeout && clearTimeout(self.highlightTimeout);
that.titles[position].addClass('OxSelected'); that.titles[position].addClass('OxSelected');
setTimeout(function() { self.highlightTimeout = setTimeout(function() {
that.titles[position].removeClass('OxSelected'); that.titles[position].removeClass('OxSelected');
delete self.highlightTimeout;
}, 250); }, 250);
}; };