// The anwer of Innocent Ibis is wrong!!// It should not have a # for the ID seens we are using getElementByIdvar element =document.getElementById("id");
element.addEventListener('click',function(){console.log("click");});
// Using javascriptvar element =document.getElementById("#id");
element.addEventListener('click',function(){console.log("click");});// Using JQuery$("#id").click(function(){console.log("click");});
functioneventHandler(event){if(event.type=='fullscreenchange'){/* gestire un interruttore a schermo intero */}else/* fullscreenerror */{/* gestire un errore di commutazione a schermo intero */}}
<body style="height: 5000px"><style>
body,/* blink currently has bug that requires declaration on `body` */
html {
scroll-snap-type: y proximity;}.snaptarget{
scroll-snap-align: start;position: relative;top: 200px;height: 200px;
background-color: green;}</style><div class="snaptarget"></div></body>