Why is $(document).ready needed after the