Don't select a tab second time
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Mon, 8 Apr 2013 13:04:40 +0000 (15:04 +0200)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Mon, 8 Apr 2013 13:04:40 +0000 (15:04 +0200)
modules/tabsManager.js

index cec88dc..1dd857d 100644 (file)
@@ -14,6 +14,9 @@ rng.modules.tabsManager = function(sandbox) {
         if(prevActive.length)\r
             prevSlug = prevActive.find('a').attr('href').substr(1);\r
         \r
+        if(prevSlug == slug)\r
+            return;\r
+        \r
         tabBar.find('li').removeClass('active');\r
         tabBar.find('a[href=#' + slug + ']').parent().addClass('active');\r
         \r