I am doing a project using primefaces.
In my project i need to change the color of p:watermark(primefaces) when i click the p:commandButton.
I tried but does not work.
Here, I added my tiny code:
Sample Code:
<p:inputText id="userNameField" update="info"/>
<p:watermark for="userNameField" value="#{...}" id="userLabelWaterMarkId"/>
<p:commandButton id="loginButtonId" onclick="showLoginBox();" update="info">
</p:commandButton>
JQuery
 function showLoginBox()
   {
     $(".ui-watermark").css("color", "red");
   }
Any idea?
 
     
     
     
    