sysCore ApS
Tel: +45 32 21 57 70
Fax: +45 69 66 33 66
Glostrup, Denmark

Quick Product & Service Guide
Competences | Services | AppHost | Clip-card support | B2B SHOP | Online Presence Pack | RFID | sysAlarms
Google Apps for Business | WADA-NET | CLUB-NET

HCORE Skræddersyet webløsninger
Vi er en del af H|CORE
Autoriseret UNI-TEL forhandler

Autoriseret forhandler
Autoriseret NAVICAT forhandler

Autoriseret forhandler
sysCore Aps supports Foundation INNOVARE
meetBSD logo
sysCore Aps supports meetBSD Conference

jQuery ready() in Prototype

I do not wish to enter the war between jQuery and Prototype camps – I use both depending on the needs – and sometimes the engine is dictated by the framework I am using.

Anyway – a piece of code that is extremely handy and that differs quite a bit between jQuery and Prototype – execute a handler once the DOM tree is loaded.

jQuery well known ready():

$(document).ready( function () { 
// my code here

Prototype version:

document.observe('dom:loaded', function(){ 
// my code here 

In fact, there is one cool feature of Prototype that I found extremely useful on several occasions – and that is the Ajax Periodical Updater.

Posted in howto, programming | Tagged , , , | Comments Off on jQuery ready() in Prototype