add javascript for fraction input type