I'm using the search component on a page to run a query service. The little clear button that appears when you start typing only clears the text in the search component. I have a second query service set up to clear results on the page. My question is, can I use javascript to run this service when I click the clear button? And if so, what is the script. I tried the following:
( ".ui-input-clear" ).on( "click", function() {
clear_service.execute();
});
Where 'clear_service' is the name of the service I want to run, but nothing happened.