change script position as the document ready issue