正如标题中所述,在刷新页面时,我的可折叠菜单不会保持关闭状态。每次加载页面时,即使在刷新之前完全关闭,可折叠菜单也会完全展开。这有点问题,因为这个可折叠的东西太多了。
下面是它的基本代码:
CSS:
//some code here for the design, background color and stuff that shouldn't matter,
// .active is what I think I need
.active, .collapsible:hover{
background-color: #02538D;
}
HTML:
<button cla
我在jQuery手机上有以下可折叠的内容。我怎样才能阻止标题被缩短?
目前,文本被截断,因此它的内容类似于“非常长的标题...”我是否需要使用css手动执行此操作,或者是否有可以更改的JQB设置?
<div data-role="collapsible">
<h4>
Really long heading goes here thats wider than the page width
</h4>
<p>
Content Co
从https://www.w3schools.com/howto/howto_js_collapsible.asp上的代码开始,我想创建一个可折叠的菜单,它也适用于嵌套内容。 var coll = document.getElementsByClassName("collapsible");
var i;
for (i = 0; i < coll.length; i++) {
coll[i].addEventListener("click", function() {
this.classList.toggle("active&