Parcourir la source

https://github.com/TapQuo/Lungo.js/pull/94 updated to Lungo.js 2.0

It's all about removing and adding the "inverted" same_classes to both current & target because it ran on visibility problems when i went to the same target from current at second time. At second time the target had the HIDe class and it wasn't shown.
Rafael Perelló il y a 13 ans
Parent
commit
6409856b89
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      src/router/Lungo.Router.js

+ 1 - 1
src/router/Lungo.Router.js

@@ -39,7 +39,7 @@ Lungo.Router = (function(lng, undefined) {
                 }
 
                 current.removeClass(CLASS.SHOW).addClass(CLASS.HIDE);
-                target.addClass(CLASS.SHOW);
+                target.removeClass(CLASS.HIDE).addClass(CLASS.SHOW);
                 lng.Element.Cache.section = target;
                 lng.Element.Cache.article = target.find(ELEMENT.ARTICLE + '.' + CLASS.CURRENT);