I think it might be the below code. I have tried adding it to the scripts area, but i get an error. Should I perhaps need to change the syntax?
<script>
jQuery(function($) {
$("form.cart").on("change", "input.qty", function() {
$(this.form).find("button[data-quantity]").data("quantity", this.value);
});
$(document.body).on("adding_to_cart", function() {
$("a.added_to_cart").remove();
});
});
</script>