The site is: www . mindfulnessgreece . gr (sorry for the spaces, I got a warning that I cannot post links)
Everything works fine in preview mode, but on live, some click operations are not performed (see attached screenshots). In chrome browser, these click operations do not work at all. On the other hand, in microsoft edge, mozilla and safari after some refreshes of the page and some time, everything works fine
The arrow in the slider does not perform operation on click (1st screenshot)
The 4 menu items do not perform any operation when clicked, as well as the audioplayer (2nd screenshot)
Any idea how to solve this issue? (preview mode is fine, code has no problem)
---
Below is the code for the menu (2nd screenshot). I have a function for the 4 menu items, which changes title, subtitle, the 2 images, audioplayer and performs animation.
By the way, I have used 4 audioplayers(for each menu item), because when track was changed (using 1 audioplayer) the time of the new track was seeked in the previous track time. Can I specify the time when using 1 audioplayer and changing track? (seek() did not work)
import wixAnimations from 'wix-animations'; let counter = 0; export function menuItemClick(image_left, image_right, title, subtilte) { $w("#image55").src = image_left $w("#image56").src = image_right $w("#text20").text = title $w("#text26").text = subtilte let audioPl if (counter == 0) audioPl = $w("#audioPlayer1") else if (counter == 1) audioPl = $w("#audioPlayer2") else if (counter == 2) audioPl = $w("#audioPlayer3") else if (counter == 3) audioPl = $w("#audioPlayer4") let timeline = wixAnimations.timeline( { "repeat": 1, "yoyo": true } ); timeline .add( $w("#image55"), { opacity: 0, x: -150, "rotate": 35, "duration": 500 } , 0) .add( $w("#image56"), { opacity: 0, x: 150, "rotate": -35, "duration": 500 } , 0) .add( $w("#text20"), { x: -200, opacity: 0, "duration": 250 } , 0) .add( $w("#text26"), { x: -200, opacity: 0, "duration": 250 } , 0) .add( audioPl, { x: -200, opacity: 0, "duration": 250 } , 0) timeline.play() $w("#button1").disable(); $w("#button2").disable(); $w("#button3").disable(); $w("#button4").disable() setTimeout(function() { $w("#button1").enable(); $w("#button2").enable(); $w("#button3").enable(); $w("#button4").enable() }, 850); } $w.onReady(function () { // Write your JavaScript here // To select an element by ID use: $w('#elementID') // Click 'Preview' to run your code //BUTTON1 $w("#button1").onClick(() => { if (counter != 0) { $w("#audioPlayer1").show() $w("#audioPlayer2").hide(); $w("#audioPlayer3").hide(); $w("#audioPlayer4").hide() counter = 0; //EDIT HERE (image_left, image_right, title, subtitle) menuItemClick("wix:image://v1/054e8b_5c7c3e376fc64d75a3f29d23bc003b12~mv2.png/MEDITATION_LEFT.webp#originWidth=327&originHeight=626", "wix:image://v1/054e8b_afc6102431bc4f72a1026dcad0a6a7ea~mv2.png/MEDITATION_RIGHT.webp#originWidth=327&originHeight=626", "Εκατοντάδες Διαλογισμοί", "Μείωσε το στρες μέσα από εκατοντάδες διαλογισμούς για όλες σου τις ανάγκες"); //EDIT HERE } }) //BUTTON2 $w("#button2").onClick(() => { if (counter != 1) { $w("#audioPlayer2").show() $w("#audioPlayer1").hide(); $w("#audioPlayer3").hide(); $w("#audioPlayer4").hide() counter = 1; //EDIT HERE (image_left, image_right, title, subtitle) menuItemClick("wix:image://v1/054e8b_c5d360b42ded40cc98de0260be7a1379~mv2.png/SLEEP_LEFT.webp#originWidth=327&originHeight=627", "wix:image://v1/054e8b_f944f360af6c459b84a3da5a29badc11~mv2.png/SLEEP_RIGHT.webp#originWidth=328&originHeight=627", "Ιστορίες Ύπνου", "Ετοιμάσου για έναν γαλήνιο ύπνο με μοναδικές ιστορίες από κορυφαίους εκφωνητές"); //EDIT HERE } }) //BUTTON3 $w("#button3").onClick(() => { if (counter != 2) { $w("#audioPlayer3").show() $w("#audioPlayer1").hide(); $w("#audioPlayer2").hide(); $w("#audioPlayer4").hide() counter = 2; //EDIT HERE (image_left, image_right, title, subtitle) menuItemClick("wix:image://v1/054e8b_f3bcfb257de84750becc8fd479ff346a~mv2.png/COURSES_LEFT.webp#originWidth=327&originHeight=627", "wix:image://v1/054e8b_3ae676b3a2bc4922b81475d262d77f2b~mv2.png/COURSES_RIGHT.webp#originWidth=327&originHeight=627", "Ολοκληρωμένα Προγράμματα", "Πλήρη ολοκληρωμένα προγράμματα για όλες τις πτυχές της ζωής σου"); //EDIT HERE } }) //BUTTON4 $w("#button4").onClick(() => { if (counter != 3) { $w("#audioPlayer4").show() $w("#audioPlayer1").hide(); $w("#audioPlayer2").hide(); $w("#audioPlayer3").hide() counter = 3; //EDIT HERE (image_left, image_right, title, subtitle) menuItemClick("wix:image://v1/054e8b_4952316eecf443378d9640278377de34~mv2.png/SOUNDS_LEFT.webp#originWidth=327&originHeight=626", "wix:image://v1/054e8b_670b06ef70434a89aabe4db707ed365a~mv2.png/SOUNDS_RIGHT.webp#originWidth=327&originHeight=626", "Εγκεφαλικά Κύματα", "Άλλαξε άμεσα διάθεση μέσω των κατάλληλων ηχητικών δονήσεων"); //EDIT HERE } }) });
It seems that one of your embeds is incompatible with the Wix site viewer.
Disable this embed and see if your site works.
This appears to be a problem with the site rendering engine. I have referred this to QA for evaluation.
In spite of the fact that "code has no problem", it might in fact be a code problem. Please share your code, nicely formatted in a code block, so we can see what you are doing.
If you use a database - check the collection permissions