Add js functionality to input