views:

100

answers:

4

I have a fairly large js lightbox gallery and an hasty user can click on a thumb before the page has finished loading, this may result in opening the actual image without the "cool" js popup effect.

Are there nice ways of "forcing" the user to wait for the page to finish loading before clicking?

Thank you very much

+2  A: 

Not sure if i get you right:

You could try to put an transparent div or something above your conent, so the user won't be able to perform clicks. I.e. the clicks won't have the effect undesired by you - to be more exact. ^^

KB22
+2  A: 

For this kind of problem, i use archetype.js. He will load all that your page need ( css, templates, javascript ), and then allow the user to do something. And you avoid to do this by hand ( it can be dirty and not so easy, if you use a lot of javascript )

Antoine Claval
This is intresting.. never heard about this before.. will surely try.Thank you
0plus1
+4  A: 

The best way to achieve this would be to place a transparent or slightly grayed div across the entire page with a very high z-order value so it sits above all other elements.

The trick with this is you want to place it in the native HTML so it is loaded/rendered before any other processing occurs and the user has a chance to react. Then, simply remove it via js once ALL other loading has been done on the page.

Mike Clark
+1  A: 

Inline onclick="return false" for anchor -- easiest way.

Anatoliy