jQuery change input type June 13, 2023 by Tarik my solution: $('#myinput').clone().attr('type','tel').insertAfter('#myinput').prev().remove();