i doing project using primefaces.
in project need change color of p:watermark
(primefaces) when click p:commandbutton
.
i tried not work.
here, added 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?
the ui-watermark class there in old browsers since primefaces uses backwardscompatibility 'hack' jquery-ui watermark well. modern browsers differently , need styling differently... browsers, question duplicate of link below.
see also:
Comments
Post a Comment