$(document).on('click', '#cart', function() {
}
from the documentation, the parameters of the on() function are event, selector, and handler. 'cart' is an ID on an element in the document. If I remove the # before the cart, the code breaks.
$(document).on('click', '#cart', function() {
}
from the documentation, the parameters of the on() function are event, selector, and handler. 'cart' is an ID on an element in the document. If I remove the # before the cart, the code breaks.