Scripter/jQuery
jQuery Loading바 구현하기
데꾸벅
2008. 7. 8. 21:59
이미 아는 사람들은 다아는 로딩바 원하는 형태로 만들기 사이트(http://www.ajaxload.info/)에서 좋은 Loading Indicator(Spinner)를 구한 다음에 아래와 같이 간단히 구현할 수 있다.
참고적으로 요기도 보아두면 좋아요~~
jQuery를 모르는 분들은 여기서 부터 시작하세요
jQuery(function($){
// Create img dom element and insert it into our document
var loading = $('<img alt="loading" src="/images/loading.gif" />')
.appendTo(document.body).hide();
// Make the image appear during ajax calls
$(window).ajaxStart(loading.show);
$(window).ajaxStop(loading.hide);
});
// Create img dom element and insert it into our document
var loading = $('<img alt="loading" src="/images/loading.gif" />')
.appendTo(document.body).hide();
// Make the image appear during ajax calls
$(window).ajaxStart(loading.show);
$(window).ajaxStop(loading.hide);
});
참고적으로 요기도 보아두면 좋아요~~
jQuery를 모르는 분들은 여기서 부터 시작하세요