WebSite X5Help Center

 
Klaus G.
Klaus G.
User

Eventlistener  de

Autor: Klaus G.
Visitado 933, Seguidores 1, Compartilhado 0  

Hallo KolAsim,

kannst du mal Prüfen ob dieser Eventlistener funktioniert ???

SEO Meldung: Verwendet keinen EventListener zur verbesserung der Scrollleistung

Oder hast du da was in Peto ???

Frohe Festtage

MCMACMASTER

<script>
require(['jquery'], function(jQuery) {
'use strict';
(function() {

jQuery.event.special.touchstart = {
setup: function( _, ns, handle ) {
this.addEventListener("touchstart", handle, { passive: !ns.includes("noPreventDefault") });
}
};

jQuery.event.special.touchmove = {
setup: function( _, ns, handle ) {
this.addEventListener("touchmove", handle, { passive: !ns.includes("noPreventDefault") });
}
};

jQuery.event.special.wheel = {
setup: function( _, ns, handle ){
this.addEventListener("wheel", handle, { passive: true });
}
};

jQuery.event.special.mousewheel = {
setup: function( _, ns, handle ){
this.addEventListener("mousewheel", handle, { passive: true });
}
};

jQuery.event.special.scroll = {
setup: function( _, ns, handle ){
this.addEventListener("scroll", handle, { passive: true });
}
};
}());
});
</script>

Publicado em
1 RESPOSTAS
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator
Usuário do mês ESUsuário do mês PT

Hallo, ... Entschuldigungfoot-in-mouth, ... dieser Code ist mir unbekannt, ich weiß nicht, was er tun soll, und ich habe keinen Touch-PC zum Experimentieren ...
... hallo und Frohe Ostern

.

Ler mais
Publicado em de  ‪ KolAsim ‪ ‪