dom elements loaded before scripts