I am working on a custom registration form, it seems to work fine in preview mode but not in live mode. So, I decided to work on a very basic function and the problem remains.
I created a lightbox which contains text inputs and a button.
Here is the code :
$w.onReady( function () {
console.log(“Ready”);
console.log(“Button exists ?”, $w(“#button3”));
#repId is an input text. #button3 is a simple button with no link.
When I preview the page and click on the button, everything is working. When I publish the page and click on the button, it does nothing.
Please post the editor URL of your site. Only authorized Wix personnel can get access to your site in the editor.Please include the name of the page involved.
@yisrael-wix It is called as soon as you want to access a members only page. So every pages except the first one. You can try accessing /accueil or /presentation and the lightbox will appear
@yisrael-wix All right, I just figured out it is working when I access correctly to the page (ie. by clicking on the link in the home page named “Entrer sur le site”) on my friend’s computer. When I try to access to a protected page directly, the event doesn’t seem to fire.
Sometimes, the lightbox appears but we don’t see the underlying page (blank).
@hello95783 Glad you got it figured out (as such) so far.
As far as do I recommend to wait for $w.onReady(), not sure what you mean. But, you can’t perform actions on components outside of the onReady() or other event handlers.