]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Make custom drilldown backButton markup working 7360/head
authorAgentPL <pavelleonidov@gmail.com>
Thu, 3 Dec 2015 04:28:50 +0000 (05:28 +0100)
committerAgentPL <pavelleonidov@gmail.com>
Thu, 3 Dec 2015 04:28:50 +0000 (05:28 +0100)
The drilldown back event currently works only with the default markup. The reason is it's currently triggered only when a custom markup doesn't exist. Fix by detaching _this._back($menu) from the existing condition.

js/foundation.drilldown.js

index 488cdda2ac6d38119a977826c7bb800e32d4640f..04aedcea10c55a0f2f55ac1c7e9b37e4435b5aa8 100644 (file)
@@ -98,8 +98,8 @@
           $back = $menu.find('.js-drilldown-back');
       if(!$back.length){
         $menu.prepend(_this.options.backButton);
-        _this._back($menu);
       }
+      _this._back($menu);
     });
     if(!this.$element.parent().hasClass('is-drilldown')){
       this.$wrapper = $(this.options.wrapper).addClass('is-drilldown').css(this._getMaxDims());