here is the code snippet for reference
function relatedItemReady($w, product, index) {
let indexStr = index.toString();
if (indexStr === "3")
{
selectedRecord = $w("#box1");
selectedRecord.style.backgroundColor = "#2DCEE0";
//highlight newly selected one ,2sept replaced it from ffffff
}
productSelectedId = product._id;
$w("#productDesc").html = "<center>" + product.description + "</center>";
$w('#container3').onClick((event) => {
$w("#txtProPrice").text = product.formattedPrice;
if (product.description === "<p>monthly</p>") {
//added on 2 sept ,only selected record should be white, rest all blue
selectedRecord = $w("#box1");
selectedRecord.style.backgroundColor = "#2DCEE0"; //highlight newly selected one
//added on 2 sept
$w('#line35').show();
$w('#line33').hide();
$w('#line32').hide();
$w('#line31').hide();
}
if (product.description === "<p>3 months</p>") {
//added on 2 sept ,only selected record should be white, rest all blue
selectedRecord = $w("#box1");
selectedRecord.style.backgroundColor = "#2DCEE0"; //highlight newly selected one
//added on 2 sept
$w('#line35').hide();
$w('#line33').show();
$w('#line32').hide();
$w('#line31').hide();
}
if (product.description === "<p>6 months</p>") {
//added on 2 sept ,only selected record should be white, rest all blue
selectedRecord = $w("#box1");
selectedRecord.style.backgroundColor = "#2DCEE0"; //highlight newly selected one
//added on 2 sept
$w('#line35').hide();
$w('#line33').hide();
$w('#line32').show();
$w('#line31').hide();
}
if (product.description === "<p>12 months</p>") {
//added on 2 sept ,only selected record should be white, rest all blue
selectedRecord = $w("#box1");
selectedRecord.style.backgroundColor = "#2DCEE0"; //highlight newly selected one
//added on 2 sept
$w('#line35').hide();
$w('#line33').hide();
$w('#line32').hide();
$w('#line31').show();
}
productLink = product.productPageUrl;
});
}