$w.onReady(function () { const cities = ['NewYork', 'Tokyo', 'Paris']; cities.forEach(city => { // Ensure the button exists before attempting to add the onClick event const collapseButton = $w(`#${city}CollapseButton`); if (collapseButton) { collapseButton.onClick(() => { toggleBox($w(`#${city}CollapsibleBox`), $w(`#${city}PlusSign`), $w(`#${city}MinusSign`)); }); } else { console.error(`Button with ID #${city}CollapseButton not found`); } }); }); function toggleBox(boxElement, plusSign, minusSign) { const isCollapsed = boxElement.collapsed; if (isCollapsed) { plusSign.hide(); minusSign.show(); boxElement.expand(); } else { minusSign.hide(); plusSign.show(); boxElement.collapse(); } }
top of page

Create Your First Project

Start adding your projects to your portfolio. Click on "Manage Projects" to get started

Check out some of my recent work!

bottom of page