Skip to content

Instantly share code, notes, and snippets.

@deholic
Created March 23, 2012 02:06
Show Gist options
  • Save deholic/2166192 to your computer and use it in GitHub Desktop.
Save deholic/2166192 to your computer and use it in GitHub Desktop.
DOM Height Calculator
getData(function (data) {
if(!!data) {
var recursiveExecute = function (data) {
if (data.length) {
// recursive 방식으로 DOM 객체를 순차적으로 작성
getExcute(data, recursiveExecute);
}
else {
// 추가된 Image 객체들의 마지막을 구하여
// 그 마지막 Image 객체가 로드 되면 길이를 재는 방식
$('div.part img').eg($('div.part img').length - 1).load(function() {
bodyScroll.refresh();
});
console.log('complete!');
}
}
getExecute(data, recursiveExecute);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment