spences10
12/22/2016 - 1:27 PM

How to clear a div in JavaScript, from http://stackoverflow.com/questions/3450593/how-do-i-clear-the-content-of-a-div-using-javascript

// Add this function somewhere on your page (preferably in the <head>)

function clearBox(elementID)
{
    document.getElementById(elementID).innerHTML = "";
}

// Then add the button on click event:
<button onclick="clearBox('cart_item')" />

// In JQuery (for reference)
// If you prefer JQuery you could do:

$("#cart_item").html("");