LightWindow: loading problem

I think nearly everybody have already seen Lightbox script in action. It’s often used to present Pictures nicely. LightWindow is one of general purposes, cause it’s not only suitable for pictures, nearly every content can be presented with it. I use it now in one of my small projects where i have to present several beauty pictures (I’ll show it you later :) ).

But there is one small problem i found, LightWindow does not work till the whole page is loaded. But that is not good, when i have multiply images on the same page and network speed is not good. LighWindow bases on prototype and I’m not familiar with that in the moment, and so unsure whether there is a way to quick as possible enable javascript execution.

I know, in jQuery it would work, cause there is a way to start execution of javascript already when DOM is loaded. Just put your code inside of:

$(document).ready(function() {
// put all your jQuery goodness in here.
});

Is there something similar in the Prototype? Does anybody know?

P.S. PlugIn Wordpresss that enables LightWindow for Wordpress, i have not testet it.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • BlinkList
  • MisterWong.DE
  • Slashdot
  • StumbleUpon
  • Technorati
  • NewsVine
  • Reddit
  • Yigg
  • HackerNews
  • LinkedIn
  • Webnews.de
  • Yahoo! Buzz

If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

Comments

Searching for something else: LightWindow not loading JS fully when displaying a page, not sure why.

As for Prototype, you should use:
Event.observe(window,’load’), function()
{
//Prototype goodness here
});

Cheers!
–Avital

Leave a comment

(required)

(required)