【发布时间】:2018-11-06 03:33:59
【问题描述】:
我正在开发一个网站,我想在其中隐藏显示在网站底部的矩形页脚面板。
当网站进入编辑模式时,它应该以某种方式工作,矩形面板应该被隐藏,而当它进入非编辑模式时,矩形面板应该是可见的。
节进入编辑模式时调用的JS代码是:
toggleEdit: function(position) {
const self = this;
if (name == undef) {
return self;
}
self[name.dataset.edit != position ? "doEdit" : "undoEdit"](position);
return self;
},
当position 的值为“hello”或“world”时,网站进入编辑模式。
问题陈述:
我想知道我需要在上面添加什么 Javascript,以便当位置的值是“hello”或“world”时,它应该隐藏通过以下 html(实际上是页脚面板)显示的所有内容:
<div class="hide-bar">
<!–– and the comment closes with ––>
</div>
【问题讨论】:
标签: javascript onclick hide show-hide