I am using jQuery Mobile 1.3.2. I have a textbox with data-clear-btn=true
.
Whenever the user typing the characters in the textbox, once it reaches the end the delete icon hiding the characters in the textbox:
I would like to hide the delete icon, once the user tabs out. I have tried using
$("#elementId").textinput("option", "clearBtn", false);
but it is not hiding the clear button. Why not?
Instead of hiding the control button, by adding the css, I have moved the delete icon outside the textbox, which allows the user the see the content inside the textbox.
$(".ui-input-clear").each(function(element){
$(this).css("right","-32px");
});