I'm trying to duplicate a field input like this in JSFiddle
But when I save the below in a html file, it is not working.
Can someone please assist?
<html>
<head>
<script>
$(function() { // <== Doc Ready
$("#email").change(function() { // When email is changed
$('#mail').val(this.value); // copy it over to mail
});
});
</script>
</head>
<body>
<input type="text" name="email" id="email" />
<input type="text" name="mail" id="mail" />
</body>
</html>