Hi guys.
I have been working on this for hours now and cannot see why it will not work.
I want to have one of the Wix transparent videos (the gold confetti transparent video) appear if a calculated field is greater than 0.
Code is below.
export function calculate_click(event, $w) {
let savingsPrice1fk = Number($w('#passedPrice1').text)
let savingsPrice1com = Number($w('#comPrice1').value)
let savingQTY1com = Number($w('#comQTY1').value)
$w('#result1').text = "$"+((savingsPrice1com - savingsPrice1fk) * savingQTY1com).toFixed(2).toString();
let confettishow = ((savingsPrice1com - savingsPrice1fk) * savingQTY1com);
if(confettishow.value > 0) {
$w('#confettiVideo').expand();
}
else{
$w('#confettiVideo').collapse();
}
The ID of the video is “confettiVideo” and it is set to be collapsed upon load.
The issue I have is that the code page is stating “#confettiVideo is not a valid selector”.
Is this something unique to the new Wix transparent videos?
Any help is appreciated.