I currently use the following code for the Fullscreen and it works great when using "onclick":
<p onmouseover="openFS(this) id="mysite"><h2>Fullscreen with JavaScript</h2>
<button onclick="openFS();">Open texto in Fullscreen Mode</button></p>
<script>
var elem = document.getElementById("mysite");
function openFS() {
if (elem.requestFullscreen) {
elem.requestFullscreen();
} else if (elem.mozRequestFullScreen) { /* Firefox */
elem.mozRequestFullScreen();
} else if (elem.webkitRequestFullscreen) { /* Chrome, Safari & Opera */
elem.webkitRequestFullscreen();
} else if (elem.msRequestFullscreen) { /* IE/Edge */
elem.msRequestFullscreen();
}
}
</script>
My problem occurs when the function is not activated when using "mouseover" or "onmouseover=" openFS (this) "s", or if there is a way to use if {mouseover} else {onclick} or something like that, I do not really know how it could be achieved, in theory it is what I need. The code is js which is the most used but if it is to use jquery then neither mode but that is as last option.
Awaiting prompt response, and thanking all help in advance.