PageSourceSearch

https://mpc-web.jp/recruit/wp-content/themes/kaishindo-recruit/assets/js/scroll-image.js

js mpc-web.jp collected 2026-10-03 19:56:38 UTC 1,154 bytes, 36 lines download raw bytes

1// スクロールを戻すと再度アニメーションをするの場合
2// (function() {
3//     const image = document.querySelectorAll('.img-wrap');
4
5//     const observer = new IntersectionObserver(function(entries) {
6//         entries.forEach(function(entry) {
7//             if (entry.intersectionRatio > 0) {
8//                 entry.target.classList.add('img-animation');
9//             } else {
10//                 entry.target.classList.remove('img-animation');
11//             }
12//         });
13//     });
14
15//     Array.prototype.forEach.call(image, function(img) {
16//         observer.observe(img);
17//     });
18// })();
19
20//アニメーションが1回だけの場合
21(function() {
22    const image = document.querySelectorAll('.img-wrap');
23
24    const observer = new IntersectionObserver(function(entries) {
25        entries.forEach(function(entry) {
26            if (entry.intersectionRatio > 0) {
27                entry.target.classList.add('img-animation');
28                observer.unobserve(entry.target);
29            }
30        });
31    });
32
33    Array.prototype.forEach.call(image, function(img) {
34        observer.observe(img);
35    });
36})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.