JS | Change input type dynamically using jquery