I'm trying to do something pretty simple, but it just doesn't seem to be working. I have a small form that asks people for a bill amount, and then if the amount is less than 50, submitting the form will trigger an alert. When this wasn't working, I started trying to find out why. This is my current code, and there isn't a value that shows up in the console. I get a blank line, showing where it's trying to pull a value, but no value is being pulled. No errors show either.
<form id="systemForm">
<fieldset><label>Average bill amount</label><input type="text" name="billAmount" id="billAmount"/></fieldset>
<p class="test" id="test">SUBMIT</p>
<script>
$( document ).ready(function() {
var theForm = $('#systemForm');
var billAmountNum = $( "#billAmount" ).val();
$( "#test" ).click(function() {
console.log(billAmountNum);
});
});
</script>