Hocker und Polster


Ihre Auswahl:
if ($("#categoryFeedback").data("show-reasons")) $("#categoryFeedback-explanation").hide() else $("#categoryFeedback-reason").hide() $("#categoryFeedback-question__yes").on("click", () => { const $container = $("#categoryFeedback") const data = { id: $container.data("id"), type: $container.attr("id"), url: window.location.href, yesOrNo: 'yes' }; $.ajax({ type: "POST", url: "/rest/pollfeedback/", data, error: console.log }); if ($container.data("has-no-thanks")) { $("#categoryFeedback-header").css("border-bottom", "none"); $("#categoryFeedback-body").css("padding", "0"); } $("#categoryFeedback-heading").text("Vielen Dank für Ihr Feedback!") $("#categoryFeedback-question").hide() $("#categoryFeedback-thanks").show() }) $("#categoryFeedback-question__no").on("click", () => { const $container = $("#categoryFeedback") const data = { id: $container.data("id"), type: $container.attr("id"), url: window.location.href, yesOrNo: 'no' }; $.ajax({ type: "POST", url: "/rest/pollfeedback/", data, error: console.log }); }) $("#categoryFeedback-close").on("click", () => { if ($("#categoryFeedback").data("has-no-thanks")) { $("#categoryFeedback-header").css("border-bottom", "none"); $("#categoryFeedback-body").css("padding", "0"); } $("#categoryFeedback-heading").text("Vielen Dank für Ihr Feedback!") $("#categoryFeedback-question").hide() $("#categoryFeedback-thanks").show() }) $(".categoryFeedback-reason__btn").on("click", (e) => { const $container = $("#categoryFeedback") const $pressedButton = $(e.target) const reason = $pressedButton.data("reason") const data = { id: $container.data("id"), reason }; $.ajax({ type: "POST", url: "/rest/pollfeedback-reason/", data, error: console.log }); $("#categoryFeedback-form__reason").text($pressedButton.text()) $("#categoryFeedback-reason").hide() $("#categoryFeedback-explanation").show() }) $("#categoryFeedback-form").on("submit", (e) => { e.preventDefault() const $container = $("#categoryFeedback") const explanation = $("#categoryFeedback-form__feedback").val() const data = { id: $container.data("id"), explanation }; $.ajax({ type: "POST", url: "/rest/pollfeedback-explanation/", data, error: console.log }); if ($container.data("has-no-thanks")) { $("#categoryFeedback-header").css("border-bottom", "none"); $("#categoryFeedback-body").css("padding", "0"); } $("#categoryFeedback-heading").text("Vielen Dank für Ihr Feedback!") $("#categoryFeedback-question").hide() $("#categoryFeedback-thanks").show() $("#categoryFeedback-close").click() })
Käuferschutz
gut 4.49/5.00