HTML5 Data Bindings Support Product Page

Possible to have 2 hide/show behaviors during data load?

Asked 10 years ago
1
has this question
10 years ago Matt Penn posted:
I watched the video here on how to include a pre-loader graphic while data is being loaded. Works great.

However, I really need to also hide the data container while the pre-loader graphic is displaying; because it contains some static text that doesn't make sense until the data pulls in. How do I accomplish both at the same time, without having to go in and hardcode things?

Replies

Replied 10 years ago
10 years ago Teodor Kuduschiev replied:
Hi Matt,
Do you want to use a preloader into a specific container, or do you prefer it to cover the whole page, and fade out when everything is loaded?
Replied 10 years ago
10 years ago Matt Penn replied:
I guess I would prefer to cover the whole page; and then fade out when loaded.
Replied 10 years ago
10 years ago Teodor Kuduschiev replied:
Then you can just create a fixed position div, with the following style applied:

#loader {
	position:fixed;
	z-index:999;
	top:0;
	left:0;
	right:0;
	bottom:0;
	background:url(loader.gif) no-repeat center #fff;
	display:block;
}

where loader.gif is some animated gif that shows loading.
This will spread the div to the whole screen size.
Then using the extended repeater behaviors you can use the "Change Property" Behavior, with on AfterRender event of the repeat region and change the display property of loader to: none.

Reply to this topic