开发者

Effect that works only when the panel is invisible

开发者 https://www.devze.com 2023-03-29 17:02 出处:网络
A few days ago I posted a question : How to show up an outputPanel with slide effect when there is focus on specific input box?

A few days ago I posted a question :

How to show up an outputPanel with slide effect when there is focus on specific input box?

I got the solution to the above problem but another problem appeared before me. Each time the focus returned 开发者_运维知识库back to inputTextArea from some other element, the effect is again shown on the already visible outputPanel, which doesnt look very nice.

Thus I want to show up the effect only when the outputPanel was hidden & not everytime the focus returned to theinputTextArea. Is there any way, I can set this condition for the effect to be shown?


I'm Using:-

Primefaces 3.0 M3 Snapshot

JSF 2.0 with Facelets


I don't know about Primefaces, but in jQuery you can do

if (!$("element").is(":visible")) 
{
//do something if element is not visibile
}

or

if ($("element").not(":visible")) 
{
//do something if element is not visibile
}
0

精彩评论

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