问题描述
|
仅当鼠标位于
panel
区域上时,才需要显示outputText
分量。我该如何实现?
我尝试将show()
和hide()
js函数与panel
上的onmouseover
事件一起使用,但未取得结果。
解决方法
如果我理解正确
<script>
$(document).ready(function(){
$(\"#something\").mouseover(function (){
$(\"#myText\").show();
})
$(\"#something\").mouseout(function (){
$(\"#myText\").hide();
}
)}
);
还有你的小组
<p:panel id=\"something\" >
<h:outputText id=\"myText\" styleClass=\"hidden\" value=\"hi i am hidden when is mouse is somewhere\"/>
</p:panel>