당신은 예를 들어 $ (문서) .ready() 외부에서() 롤 함수를 호출하려면 어떻게 외부 :그것을
$(document).ready(function(){
function lol(){
alert('lol');
}
});
이 시도 :
$(document).ready(function(){
lol();
});
그리고 단순히 :
lol();
그것은 같은 외부 자바 스크립트 내에서 호출해야합니다
,function dostuff(url){
lol(); // call the function lol() thats inside the $(document).ready()
}
이 간단한 솔루션이 저에게 효과적입니다. –
시간이 절약되었습니다. – Oritm
내가 찾은 혼란스럽고 복잡한 대답 중에서, 이것이 나를 위해 일한 유일한 것입니다. – jyoseph