I am trying to select every input value with the class ‘netSuiteValue’ when the submit button is clicked. Here is what I have so far:
$('.netSuiteValue').each(function() {
var inputValue = $(this).val();
$('.submitBtn').click(function() {
$('.theValue').val('all values' + inputValue);
});
});
I can not figure out why it is not working.
You’re going about it the wrong way. Bind the the click event of the submit button first, then gather your data:
Here’s a working fiddle.