I'm currently working on creating a Shopping Cart using HTML, CSS, JavaScript, and JQuery. The idea is that when you click "Add to Cart" for the orange item, most of the HTML elements will disappear, leaving only the table displaying the Shopping Cart. However, I encountered an error "Uncaught TypeError: Cannot read property 'value' of null Shopping Cart" in the console when trying to update the cart after changing the quantity. Despite my efforts to find a solution, I have not been successful. Any assistance would be greatly appreciated.
https://jsfiddle.net/John_Badew/er9z3kg1/10/
$(document).ready(function() {
$("#bButton").click(function() {
$(".sTable").append("<td>Banana</td");
$(".sTable").append("<td><form><input id = 'bupdateQuantity' type='number' name='quantity' min='1'max='10'></form></td>");
$(".sTable").append("<td>50 cents</td>");
$(".sTable").append("<td id = 'bPrice'></td>");
});
});
$(document).ready(function() {
$("button").click(function() {
$(".disappear").hide();
});
});