If you want to make something client-side once the DOM has been loaded, you should try with this: document.observe("dom:loaded", function() { // initially hide all containers for tab content $$('div.tabcontent').invoke('hide'); });
Is more like jQuery(document).ready();
Greetings.