From: Aleksander Ɓukasz Date: Mon, 8 Apr 2013 13:04:40 +0000 (+0200) Subject: Don't select a tab second time X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/3cb3fafa935f0f4536f7ed45abc26123b224f068?ds=sidebyside;hp=136bc0aa43257d1ccc8f353dd24b99c8561ef0d2 Don't select a tab second time --- diff --git a/modules/tabsManager.js b/modules/tabsManager.js index cec88dc..1dd857d 100644 --- a/modules/tabsManager.js +++ b/modules/tabsManager.js @@ -14,6 +14,9 @@ rng.modules.tabsManager = function(sandbox) { if(prevActive.length) prevSlug = prevActive.find('a').attr('href').substr(1); + if(prevSlug == slug) + return; + tabBar.find('li').removeClass('active'); tabBar.find('a[href=#' + slug + ']').parent().addClass('active');