I want to give a custom style to the p:autoComplete field, according to the value selected (for example, a pink background for the value GIRL and gray for BOY and so on).
I know I can achieve this using Javascript / jQuery, but I have to read the selected value first (using Javascript). As the selected value is not attached to DOM, I find it very hard to do and I tried various ways but none of them was success.
Please advice me how to read the selected value of the p:autoComplete field using Javascript / jQuery.
How to read the selected value of an p:autoComplete field
-
- Information
-
Who is online
Users browsing this forum: No registered users and 72 guests