Skip to content

Instantly share code, notes, and snippets.

View PaulvdDool's full-sized avatar

Paul van den Dool PaulvdDool

View GitHub Profile
@PaulvdDool
PaulvdDool / global.js
Last active November 5, 2023 15:35
Line item properties in Dawn theme for Bundles app
// when variant changes
this.updateBundleVariant( variant );
// add at bottom of JS file
function updateBundleVariant( variant ) {
// remove old line item properties from DOM
[ ...document.querySelectorAll( '.bundles_lineItemProperty' ) ].forEach( lineItemProperty => {
lineItemProperty.parentNode.removeChild( lineItemProperty );
} );