can you see what is wrong with this code

can you see what is wrong with this code

can you see what is wrong with this code ? I have a form with 2  input text boxes and 2 submit buttons, when the user clicks the second button ,

it should list all the months starting with letter "J",






<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>submit demo</title>
<style>
p {
margin: 0;
color: blue;
}
div,p {
margin-left: 10px;
}
span {
color: red;
}
</style>
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
</head>
<body>
<p>Type 'correct' to validate.</p>
<form action="javascript:alert( 'success!' );">
<div>
<input type="text"  >
<input type="text" id ='months' >


<input type="submit"  >

<input type="submit"  id ="other" >
</div>
</form>
<span></span>
<script>
$( "form" ).submit(function( event ) {
if ( $( "input:first" ).val() === "correct" ) {
$( "span" ).text( "Validated..." ).show();
return;
}
$( "span" ).text( "Not valid!" ).show().fadeOut( 1000 );
event.preventDefault();
});


    $(document). ready(function() {
   
   
      $( "#other" ).click(function() {
   
   
        var months = [  'January', 'February', 'March', 'April', 'May',
                        'June', 'July', 'August', 'September', 'October',
                        'November', 'December'];
        months = $.grep(months, function(value, i) {
            return ( value.indexOf('J') == 0 );
        });
        $(' #months').html( '<li>' + months.join('</li><li>') + '</li>' );
    });
})(jQuery);


</script>
</body>
</html>