在html页面中,我有一个div-reportControlPanel
,如下所示。我已将另一个div-reportControlPanel1
包含为不同的ID。
<div id="reportControlPanel" class="pentaho-rounded-panel-bottom-lr pentaho-shadow">
<div id="promptPanel" class="pentaho-rounded-panel-bottom-lr"></div>
</div>
<div id="reportControlPanel1" class="pentaho-rounded-panel-bottom-lr pentaho-shadow">
<div id="promptPanel" class="pentaho-rounded-panel-bottom-lr"></div>
</div>
此处显示/隐藏基于div's
触发的url
。
if(prptName == "css.prpt")
{
alert("if");
document.getElementById("reportControlPanel").style.display = 'none';
document.getElementById("reportControlPanel1").style.display = 'block';
}
但由于在两个不同的div
内使用相同的子Div- promptPanel ,我的内容无法正确加载。 promptPanel
pentaho system
使用了div
div
。我正在尝试另一个css
来修改prpt
的{{1}}。
感谢。
答案 0 :(得分:0)
重申Moishe已经对你说过的话:wxthread
是唯一的。您目前有两个id
个ID,这意味着第二个可能永远不会被调用。现在,您可以使用javascript,但是对于您的代码看起来很少的知识,您可以使用简单的哈希URL +一些基本的CSS。
promptPanel
$(document).ready(function() {
$('a').click(function() {
$('#url').html($(this).prop('href'));
});
});
div.pentaho-rounded-panel-bottom-lr {
display: none;
}
div.pentaho-rounded-panel-bottom-lr .pentaho-rounded-panel-bottom-lr {
display: block;
}
:target {
display: block !important;
}