mirror of https://github.com/4xmen/xshop.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
499 B
JavaScript
18 lines
499 B
JavaScript
document.addEventListener('DOMContentLoaded', function () {
|
|
document.querySelectorAll('.autoplay-clip-item').forEach(function (el) {
|
|
el.addEventListener('mouseenter', function () {
|
|
try {
|
|
this.querySelector('video').play();
|
|
} catch {
|
|
}
|
|
|
|
});
|
|
el.addEventListener('mouseleave', function () {
|
|
try {
|
|
this.querySelector('video').pause();
|
|
} catch {
|
|
}
|
|
});
|
|
});
|
|
});
|