Change to use .ready attribute