$(document).ready(function() {
var modelNumber = false;
var Description = false;
$('#step-two-btn').click(function(e) {
e.preventDefault();
modelNumber = $("#model-number-field").val();
Description = $("#description-field").val();
alert(modelNumber); //undefined
alert(Description); //undefined
});
});
Can anyone tell me why the following variables are returning undefined? I have defined global variables but jquery does not seem to recognize them.