Effect that works only when the panel is invisible
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 FaceletsI 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
}
精彩评论