Add postcode reset to checkout.
This commit is contained in:
22
assets/reset-postcode.css
Normal file
22
assets/reset-postcode.css
Normal file
@@ -0,0 +1,22 @@
|
||||
.postcode-reset {
|
||||
font-size: var(--wp--preset--font-size--small, 13px);
|
||||
line-height: 1.3;
|
||||
margin-top: 11px;
|
||||
|
||||
a {
|
||||
color: var(--wc-red);
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
filter: brightness(160%);
|
||||
}
|
||||
}
|
||||
|
||||
.bevestiging {
|
||||
display: none;
|
||||
|
||||
&[data-open="true"] {
|
||||
display: inline;
|
||||
}
|
||||
}
|
||||
}
|
||||
14
assets/reset-postcode.js
Normal file
14
assets/reset-postcode.js
Normal file
@@ -0,0 +1,14 @@
|
||||
document.addEventListener("click", function (event) {
|
||||
event.preventDefault();
|
||||
if (event.target.matches(".reset-postcode-show-comfirm")) {
|
||||
console.log("link1 button clicked!");
|
||||
document.querySelector(".bevestiging").dataset.open = true;
|
||||
}
|
||||
if (event.target.matches(".accept")) {
|
||||
console.log("link2 button clicked!");
|
||||
}
|
||||
if (event.target.matches(".decline")) {
|
||||
console.log("link3 button clicked!");
|
||||
document.querySelector(".bevestiging").dataset.open = false;
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user