javascript odyssey
- I am on a journey. A journey into worlds of javascript and CSS. Browsers drift like continents over standard grids, causing fractures and shakes now and then, moving on unimpressed. My small raft is shaken by the waves they make, but stays afloat. I am not certain if it's a shore I am looking for or more the journey's joy that drives me. Probably it does not matter. There is only the Now, everything else is speculation.
- This is what i found so far:
- The annoying flashes during image switching in the header have a known cause! Setting full opacity on an image in Firefox, is causing it. Richard Rutter explains that setting it to 0.99999 just avoids this. I changed this for my code here on the site and the annoying flashes are gone. Would be nice to have that as default in scriptaculous
- A candidate for the window.onload replacement. My champion in this is
addDOMLoadEvent
from thefutureoftheweb, written by Dean Edwards/Matthias Miller/John Resig and compiled by Jesse Skinner. These guys have puzzled lots of things together and the list of people involved in the development is very long.
It's now running at this site and working nicely with Firefox and IE. The best thing is that I included the function in my scenery script and also into the hinclude from mnot and both are working and not stepping on each others toes! I verified it for IE6 (PC), Firefox 1.5 (PC+OSX), Safari, Camino, Opera 9.02 (PC+OSX). addDOMLoadEvent
makes loading the pages much nicer and (seemingly?) faster. It was a bit of a struggle to find it since the number of blogs talking about window.onload is quite exhaustive and manyalmost there
articles can be found.- Since I was at
onload
events anyway, I decided to visit the country of DOM events some more. There is a nice introduction for tourists by Mark Wilton-Jones. So now my header images blend in when loaded, much nicer, better code and all.
Technorati Tags: javascript, window.onload