Open
Description
Valid full size code:
$(document).ready(function () {
$(".add-cart").click(function (event) {
event.preventDefault();
$entry = $(this).attr("data");
$count = $("#numCount").val();
axios.post("/cartadd/", {
"entry": $entry,
"count": $count
})
.then(function (html) {
$("#dlgCartAddBody").html(html);
$("#dlgCartAdd").modal();
})
.catch(function () {
alert("error");
});
});
});
can't be compressed. May be .then(
or .catch(
problem... Axios is good use JS library for AJAX, but code can't be compressed...
Metadata
Metadata
Assignees
Labels
No labels