开发者

Show a piece of text only when mouseover a certain region

开发者 https://www.devze.com 2023-03-14 17:19 出处:网络
I need to show a outputText component only when the mouse is over a panel region. How can I achieve that ?

I need to show a outputText component only when the mouse is over a panel region. How can I achieve that ?

I tried using show() & hide() js functions with onmouseover event on panel but 开发者_JS百科failed to achieve results.


If i understood correctly

<script>
         $(document).ready(function(){
        $("#something").mouseover(function (){
          $("#myText").show();
        })
         $("#something").mouseout(function (){
          $("#myText").hide();
        }
     )}
     );

And your Panel

  <p:panel id="something" >
          <h:outputText id="myText" styleClass="hidden" value="hi i am hidden when is mouse is somewhere"/>
       </p:panel>
0

精彩评论

暂无评论...
验证码 换一张
取 消