Roo/bootstrap/NavItem.js
authoredward <edward@roojs.com>
Thu, 29 Oct 2015 05:05:31 +0000 (13:05 +0800)
committeredward <edward@roojs.com>
Thu, 29 Oct 2015 05:05:31 +0000 (13:05 +0800)
Roo/bootstrap/NavItem.js

index e74d9ab..7a85d53 100644 (file)
@@ -167,11 +167,6 @@ Roo.extend(Roo.bootstrap.NavItem, Roo.bootstrap.Component,  {
             return;
         }
         
-        if(this.animateRef && this.href.charAt(0) == '#'){
-            this.scrollToElement(e);
-            return;
-        }
-        
         var p = this.parent();
         if (['tabs','pills'].indexOf(p.type)!==-1) {
             if (typeof(p.setActiveItem) !== 'undefined') {
@@ -184,6 +179,11 @@ Roo.extend(Roo.bootstrap.NavItem, Roo.bootstrap.Component,  {
             p.parent().el.select('.navbar-collapse',true).removeClass('in');  
         }
         
+        if(this.animateRef && this.href.charAt(0) == '#'){
+            this.scrollToElement(e);
+            return;
+        }
+        
     },
     
     isActive: function () {