HTML5 Data Bindings Support Product Page

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

Asked 26 Nov 2014 22:23:25
1
has this question
26 Nov 2014 22:23:25 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 27 Nov 2014 09:40:49
27 Nov 2014 09:40:49 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 27 Nov 2014 17:00:44
27 Nov 2014 17:00:44 Matt Penn replied:
I guess I would prefer to cover the whole page; and then fade out when loaded.
Replied 27 Nov 2014 17:06:43
27 Nov 2014 17:06:43 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