【问题标题】:How to turn off responsive menu in touchfolio theme?如何关闭 touchfolio 主题中的响应式菜单?
【发布时间】:2013-10-30 22:16:17
【问题描述】:

我正在替换Touchfolio Wordpress 主题中的现有菜单,并试图弄清楚如何关闭当前菜单的响应能力。

我在 css 中清除了所有相关的媒体查询,但有东西触发了滑块插件端的响应式菜单。我相信断点设置为 800px,但我在脚本中找不到任何与此相关的内容。

这是演示站点中现有脚本的链接:http://dimsemenov.com/themes/touchfolio/demo/wp-content/themes/touchfolio/js/jquery.slider-pack.js

【问题讨论】:

    标签: javascript css wordpress


    【解决方案1】:

    您可以从删除主题 main.js 中的 displayMobileMenu 函数开始。它看起来像这样:

    displayMobileMenu = function() {
                if(mobileMenu) {
                    mobileMenu.css('display', 'block').removeClass('menu-close-button');
                    _menusContainer.hide().css({ height : 0 });
                    return;
                } 
    
                var headerHeight = _headerSideMenu.height();
                mobileMenu = $('<a class="menu-button"><i class="menu-button-icon"></i>menu</a>');
                $('.top-logo-group').after(mobileMenu);
    
                setTimeout(function() {
                    var height = _menusContainer.height();
                    _menusContainer.hide().css({ height : 0 , top: _headerSideMenu.height()});
    
                    mobileMenu.bind('click.mobilemenu',function(e) {
                        e.preventDefault();
                        if(isMenuAnimating) {
                            return false;
                        }
    
                        mobileMenu.toggleClass('menu-close-button');
    
                        if ( _menusContainer.is(':visible') ) {
                                _menusContainer.animate({ height: 0 }, { duration: 300, complete: function () {
                                _menusContainer.hide();
                            } 
                        });
                        } else {
                            _menusContainer.show().animate({ height : height }, { duration: 300 });
                        }
                        isMenuAnimating = false;
                        return false;
                    });
                }, 0);
    
            },
    

    但也可以像这样简单:

    displayMobileMenu = function() {},
    

    还有一些东西可以改变小屏幕上的菜单,但它并没有完全折叠。

    【讨论】:

      猜你喜欢
      • 2015-08-26
      • 1970-01-01
      • 1970-01-01
      • 2019-07-12
      • 1970-01-01
      • 1970-01-01
      • 2013-10-30
      • 1970-01-01
      • 2013-02-20
      相关资源
      最近更新 更多