![](/img/trans.png)
[英]How can I add a js script to an html web page and not have it apply to subpages?
[英]How to add subpages to a page in wordpress?
我想添加几个像这样的新标签/子页面/子内容(我不知道它叫什么): http : //www.rle.mit.edu/gg/publications/#1456759349089-640f1dcb-938f
【出版物】页面共有【2016】,【2015】,...
当我打到2016年时,相对的内容就会显示出来。 我怎样才能做到这一点? 谢谢。
从观看您给出的演示开始,您正在谈论的是手风琴。 试试这个插件https://wordpress.org/plugins/tabby-sensitive-tabs
如果您想自己做,请将其复制到文件中:
<script>
function pshow(id){
document.getElementById(id).style.display="block !important";
}
function phide(id){
document.getElementById(id).style.display="none !important";
}
</script>
<a href="javascript:pshow('p1')">Show p1</a>
<a href="javascript:phide('p1')">Hide p1</a>
<p class="hide" id="p1">This is p1</p>
在设计中添加此内容>自定义CSS
.hide{display:none !important;}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.