I'm trying to get the user to enter their email id into the text-box, so I can store it into my database.
Here's the barebones HTML with corresponding jQuery so the code can be examined in its basic functionality. I'm still learning JS so I might have picked up some code from here and there.
Problem: The email id isn't being displayed on screen.
<form id="signup-form">
<div class="form-group">
<input type="text" class="form-control" name="email" id="email" placeholder="get informed when it's online!"/>
<button id="signup-button" class="btn btn-default">count me in!</button>
</div>
</form>
JQuery:
$("#signup-form").ready(function() {
$("#signup-button").click(function() {
alert($('#email').val());
});
});
Don't know what I'm doing wrong. Help.