From c263d3bed49f4e950c7dc28dd9673ea76ca81621 Mon Sep 17 00:00:00 2001 From: Deltacms Date: Mon, 23 Oct 2023 08:57:32 +0200 Subject: [PATCH] =?UTF-8?q?=20pointer=20events=20none=20en=20grand=20?= =?UTF-8?q?=C3=A9cran=20seulement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core.js.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/core/core.js.php b/core/core.js.php index 5e19c9a..688aa8f 100644 --- a/core/core.js.php +++ b/core/core.js.php @@ -553,14 +553,16 @@ $(document).ready(function(){ /** * Affiche le sous-menu quand il est sticky */ - $("nav:not(.navsub)").mouseenter(function(){ - $("#navfixedlogout .navSub").css({ 'pointer-events' : 'auto' }); - $("#navfixedconnected .navSub").css({ 'pointer-events' : 'auto' }); - }); - $("nav, .navSub").mouseleave(function(){ - $("#navfixedlogout .navSub").css({ 'pointer-events' : 'none' }); - $("#navfixedconnected .navSub").css({ 'pointer-events' : 'none' }); - }); + $("nav:not(.navsub)").mouseenter(function(){ + $("#navfixedlogout .navSub").css({ 'pointer-events' : 'auto' }); + $("#navfixedconnected .navSub").css({ 'pointer-events' : 'auto' }); + }); + $("nav, .navSub").mouseleave(function(){ + if($(window).width() > 799 ) { + $("#navfixedlogout .navSub").css({ 'pointer-events' : 'none' }); + $("#navfixedconnected .navSub").css({ 'pointer-events' : 'none' }); + } + }); /** * Chargement paresseux des images et des iframes