function preloading (imageArray) {
let n = imageArray.length;
for (let i = 0; i < n; i++) {
let img = new Image();
img.src = imageArray[i];
}
};
preloading([
'/your-url/your-file1.jpg', '/your-url/your-file2.jpg', '/your-url/your-file3.jpg'
]);
크롬 개발자 도구(Chrome DevTools, Ctrl+Shift+I) > Network 탭을 통해 확인 가능
- Ref. Site : https://www.photo-mark.com/notes/image-preloading/
'jQuery' 카테고리의 다른 글
[jQuery] Page Redirection (0) | 2018.12.23 |
---|---|
[jQuery] Slide Left and Right Toggle Effect - Example (0) | 2018.12.15 |
[jQuery] Plugin - LightBox, Modal Popup, Youtube Modal (0) | 2018.11.02 |
[javascript] 파일첨부시 특정 파일확장자만 선택 / input type="file" 초기화 (1) | 2018.10.14 |
[jQuery] Plugin - fullPage.js (0) | 2018.10.07 |