일상다반사
2013년 1월 2일 수요일
[jQuery] 이미지 로드 실패시 대체이미지
$(document).ready(function() {
// 이미지 로드 실패시 대체 이미지 표시
$('img').error(function() {
$J(this).attr('src',
'대체이미지경로'
);
}).each(function(n) {
$J(this).attr('src', $J(this).attr('src'));
});
});
최근 게시물
이전 게시물
홈
피드 구독하기:
글 (Atom)