#HTMLBox
*Default state: HIDE
When accessing the homepage, a hidden HTML BOX is I want to show
If click #HTMLBox or click anywhere on the homepage, i want to HIDE.
#HTMLBox
*Default state: HIDE
When accessing the homepage, a hidden HTML BOX is I want to show
If click #HTMLBox or click anywhere on the homepage, i want to HIDE.
To load something automaticaly you just need to put it inside onRready()-Code-part.
Your code always starts in the first code-lines with all needed IMPORTS
import wixData…
import wixLocation…
and so on…
And the next veryimportant code-line in every of your future projects always should be —> $w.onReady()
$w.onReady(()=>{
//here you put in all the rest of your futured code....
});
If you should use a DATASET, then the next directly following code-line should be…
$w.onReady(()=>{
$w('#myDatasetIDhere').onReady(()=>{
//all the rest of your code here....
};
});
When you put console-logs into all your CODINGS, you will understand your own codes better…
$w.onReady(()=>{console.log("Page is READY now!");
$w('#myDatasetIDhere').onReady(()=>{
console.log("My DATASET is READY now!");
//all the rest of your code here....
};
});
Back to your wished functionality…
So you want to show your HTML.Box as soon as your page has loaded.
When is your page loaded? Exactly…
$w.onReady(()=>{console.log("Page is READY now!"); });
Now try…
$w.onReady(()=>{console.log("Page is READY now!");
$w('#IDofHTMLcomponentHere').expand();
$w('#IDofHTMLcomponentHere').show('fade');
});
I am weak in English
I feel that you have kindly explained it to me.
HTMLBOX is visible, but click anywhere, it is not hidden. I’ll try it slowly. Thank!!
There doesn’t seem to be a command that hides when click anywhere, right?
and in the lower right corner of the console
There is no HTMLBox Eventhandle MouseClick Event.
Is there any way to hide HTMLComponent by clicking?
If the HTMLBox is clicked, the condition to hide the HTMLBox and
Is it possible to hide the HTMLBox by clicking anywhere on the homepage?