Am using JSF and Primefaces .. And i need when i focus on the outlabel the input text gets background color This is my code :
<p:panelGrid columns="2" layout="grid" style="border:0px none;background:none" styleClass="ui-panelgrid-blank ">
   <p:outputLabel value="#{msg.PurchaseReturns_Txt_Document_NO}"   />
   <p:inputText readonly="true" value="#{quotationMB.instance.object.quotationid}"/>
</p:panelGrid>
<p:panelGrid styleClass="datePick ui-panelgrid-blank " columns="2" layout="grid"  style="border:0px none;background:none">
   <p:outputLabel value="#{msg.RequestForQuotation_Txt_Date}" />
   <p:calendar  value="#{quotationMB.instance.object.validto}" locale="de" navigator="true" pattern="yyyy-MMM-dd" showOn="button" />
</p:panelGrid>
*************************JAVA Script*******************************
I have tried this code .. It worked but on the whole input texts that i have in my page :
 $('.ui-outputlabel').click(function() {
    $(this).find('.ui-inputtext').css('background-color', 'red');
});
 
    