Changed 'ready' event to 'DOMContentLoaded'