I'm new at javascript and I need some help making sense of this code and why it's not working.
<html>
<head>
<title></title>
</head>
<body>
<form action="" method="POST">
<input id="in" type="text" name="name">
</form>
<button id="add">addone</button>
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<script>
$('#add').click(function() {
$('#in').append('<br /><input type="text" name="name">');
});
</script>
</body>
</html>
I'm trying to append another html input but I have no ideas why it's not working!?.
inputhas no children