how to clear input and hide input-clear-button.
im using $$(input).val(’’); but how to hide the x clear button?
$$('.input-clear-button').hide();
But I do suggest try
$$(input).on('change', function(data) {
if (data.length == 0) {
$$('.input-clear-button').hide();
} else {
$$('.input-clear-button').show();
}
});
1 Like