This content has been marked as final. Show 3 replies
oracle_student_777 wrote:What are you actually trying to do?
I have two textarea, :P1_LOC_A and :P1_LOC_B. on click on :P1_LOC_A, i want to addClass say "lov_focus" (which make the textarea focus)
and on click of some where else on the page , i want to removeClass "lov_focus" (which will remove the textarea focus)
There is already a built-in pseudo-class<tt>:focus</tt> pseudo-class automatically available for use as a selector in CSS and jQuery.
oracle_student_777 wrote:You don't have to add a class. The browser automatically tracks which element has input focus, and styling can be applied to this element using the <tt>:focus</tt> pseudo-class selector. See the example in the linked document.
suppose i click on textarea, it gets highlighted with blue border (what happens is class is added "lov_focus").
now what i want is when i click somewhere elseThis will also happen automatically if the <tt>:focus</tt> pseudo-class selector is used.
in the page other then the text area, highlighted blue border should be removed (means removeClass "lov_focus" which is added earlier)
Do you know how to use CSS in APEX? What APEX version are you using?