how can I determine when the clear button of a search bar is clicked
how can I determine when the clear button of a search bar is clicked
Hello,
Please try to add next code to page load event
pre
$(document).on('click', '.ui-input-clear', function () {
alert('cleared');
});
/pre
Works great....Thanks
This appears to trap the entire app. Is there a way to do this by page?
Hello Roger,
Please try this code:
code$("[dsid='startScreen']").on('click', '.ui-input-clear', function () {
alert('cleared');
});
//where startScreen - name of page /code
This seems to work just fine.
$(document).on('click', '#PriceMaint .ui-input-clear', function () {
});
Roger,
Thank you for the update. Let us know if you need any further help.
Great, THANK YOU!!
The following works by page. But now within a page it will grab and control with .ui-input-clear. I would like to limit the code below for searchbar controls. Is that possible?
$(document).on('click', '#PriceMaint .ui-input-clear', function () {
Hello Roger,
Could you please try this one:
code$(document).on('click', 'div.startScreen_mobilesearchbar_2 .ui-input-clear', function () {
alert('cleared');
}); /code
//where startScreen - name of pageg
mobilesearchbar_2 - name of searchbar