select input search when clicking
select input search when clicking
silens
Posts: 101Questions: 40Answers: 0
I would like you to click on a search field of the table, select the value that you entered. the same thing that does when pressing double click
I tried this but it does not work
function selected(){ //Selecciona un campo con un solo click
$("input[type='text']").off("click");
$("input[type='text']").on("click", function () {
$(this).select();
});
$("input[type='search']").off("click");
$("input[type='search']").on("click", function () {
$(this).select();
});
$("input[type='number']").off("click");
$("input[type='number']").on("click", function () {
$(this).select();
});
}
This discussion has been closed.
Answers
Without seeing it in a test case its hard to say but my guess is you are running into thie FAQ My events don't work on the second page. You might need to use jQuery delegated events since the table inputs aren't in the DOM when your above code executes.
Kevin