[Fix] document.ready instead of closure