Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That'll work but you'll get flash of content I think. (Or layout shift, idk what's the right name for it.) The way I did it, the common elements are defined in common.js and inserted in individual pages, but the insert point is an inline script calling a function, not a div with specific id. Then the scripts run during page load and the page shows correctly right away.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: