fixes #953: Leave users' whitespace alone. I'm serious!
[redakcja.git] / redakcja / static / js / wiki / base.js
index 61a3949..de1d8e5 100644 (file)
                if($tab.length != 1)
                        $tab = $(DEFAULT_PERSPECTIVE);
 
-               var $old = $('#tabs li').filter('.active');
+               var $old = $tab.closest('.tabs').find('.active');
 
                $old.each(function(){
                        $(this).removeClass('active');