Please look this image and cross button I have a search form, that has input field using primefaces
<p:inputText required="true" placeholder="#{cc.attrs.searchTip}" value="#{cc.attrs.queryProperty}" />
As you can see, I am using composite:attribute. I want an action attached to this cross button(X button appears on the right side of input field).
I used firebug to see the cross button id. it shows something like this:
<a class="ui-input-clear ui-btn ui-icon-delete ui-btn-icon-notext ui-corner-all" href="#"></a>
So I wrote a jquery code to test and show alert
$(document).ready(function(){
$(".ui-input-clear ui-btn ui-icon-delete ui-btn-icon-notext ui-corner-all").click(function(){
alert("The cross button was clicked.");
});
});
And it fails :(