0
동적으로로드 된 요소가로드 완료되었는지 확인하려고합니다.요소가 동적으로로드되는지 감지하는 방법.
사용자가 버튼 -> 요소로드 -> 요소로드 여부를 확인하고 싶습니다.
나는 콘솔에서 '부하 테스트 사업부'쇼 .... 덕분에 많이 얻을 어떻게
<button id='click'>click</button>
//create and append div..
$('#click').click(function(){
var div= $('<div>').attr('id','testDiv').addClass('div');
$('body').append(div);
})
//detect when the div is loaded...
$('#testDiv').load(function(){
console.log('load test div')
})
이있다!
[.load()] (http://api.jquery.com/load/)는 생각하지 않습니다. –
로드는 ajax 호출 용입니다. 왜 그걸 알고 싶니? 추가 후 dom에 있습니다. –