Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

MediaWiki:Common.js: Difference between revisions

MediaWiki interface page
No edit summary
No edit summary
Line 7: Line 7:
     hoverTimer = setTimeout(function() {
     hoverTimer = setTimeout(function() {
       panel.classList.add('hovered');
       panel.classList.add('hovered');
     }, 300); // Delay the flip by 300ms (you can adjust the value)
     }, 200); // Delay the flip by 200ms (you can adjust the value)
   });
   });



Revision as of 18:15, 22 December 2024

/* Any JavaScript here will be loaded for all users on every page load. */
document.addEventListener('DOMContentLoaded', function() {
  const panel = document.querySelector('.panel');
  let hoverTimer;

  panel.addEventListener('mouseenter', function() {
    hoverTimer = setTimeout(function() {
      panel.classList.add('hovered');
    }, 200); // Delay the flip by 200ms (you can adjust the value)
  });

  panel.addEventListener('mouseleave', function() {
    clearTimeout(hoverTimer); // Prevent the flip if the mouse leaves before the delay
    panel.classList.remove('hovered');
  });
});
Cookies help us deliver our services. By using our services, you agree to our use of cookies.