I’m having trouble with
I’ve tried a whole bunch of ways to bring a box to front on a click but nothing works
Working in
Wix Studio Editor
Site link
(https://patrick4885.wixstudio.com/erg4#leaders)
What I’ve tried so far
Here’s some code that I would think is most likely to work, but doesn’t:
$w.onReady(() => {
$w("#box106").onClick((event) => {
$w("#box106").style.zIndex = "999";
$w("#box108").style.zIndex = "1"; // Reset other element$w("#box110").style.zIndex = "1"; // Reset other element$w("#box112").style.zIndex = "1"; // Reset other element$w("#box185").style.zIndex = "1"; // Reset other element});
$w("#box108").onClick((event) => {
$w("#box108").style.zIndex = "999";
$w("#box106").style.zIndex = "1"; // Reset other element
$w("#box110").style.zIndex = "1"; // Reset other element
$w("#box112").style.zIndex = "1"; // Reset other element
$w("#box185").style.zIndex = "1"; // Reset other element
});
$w("#box110").onClick((event) => {
$w("#box110").style.zIndex = "999";
$w("#box106").style.zIndex = "1"; // Reset other element
$w("#box108").style.zIndex = "1"; // Reset other element
$w("#box112").style.zIndex = "1"; // Reset other element
$w("#box185").style.zIndex = "1"; // Reset other element
});
$w("#box112").onClick((event) => {
$w("#box112").style.zIndex = "999";
$w("#box106").style.zIndex = "1"; // Reset other element
$w("#box108").style.zIndex = "1"; // Reset other element
$w("#box110").style.zIndex = "1"; // Reset other element
$w("#box185").style.zIndex = "1"; // Reset other element
});
$w("#box185").onClick((event) => {
$w("#box185").style.zIndex = "999";
$w("#box106").style.zIndex = "1"; // Reset other element
$w("#box108").style.zIndex = "1"; // Reset other element
$w("#box110").style.zIndex = "1"; // Reset other element
$w("#box112").style.zIndex = "1"; // Reset other element
});
});
})
Anyone have any suggestions?