多级推送菜单,我默认打开,我如何使默认关闭移动?
问题描述:
我使用这种多层次推菜单中的WordPress主题我创建:http://tympanus.net/Development/MultiLevelPushMenu/index2.html多级推送菜单,我默认打开,我如何使默认关闭移动?
建议说,更改代码为真见下文:
_init : function() {
... 这一点。 open = true;
但这并没有工作,所以这等岗位上堆栈溢出说,更改代码并添加此,见下图:
function mlPushMenu(el, trigger, options) {
this.el = el;
this.trigger = trigger;
this.options = extend(this.defaults, options);
// support 3d transforms
this.support = Modernizr.csstransforms3d;
if(this.support) {
this._init();
this._openMenu(); // added
}
}
这个工作。但是,如何更改我的移动视图900px或更低的默认关闭?
答
我终于明白了这一点。如果有人需要,这是答案。
function mlPushMenu(el, trigger, options) {
this.el = el;
this.trigger = trigger;
this.options = extend(this.defaults, options);
// support 3d transforms
this.support = Modernizr.csstransforms3d;
if(this.support) {
this._init();
if($(window).width() >= 991){
this._openMenu(); // added
}
}
}
这是我的网站链接:http://worldwayssocialmarketing.org/louisiana/ –