INNER CODE UNIT · JavaScript

hide

ucscGenomeBrowser/kent · src/hg/utils/registryPages/index.js:59

  function hide(){
    tip.removeAttribute('data-on');
    tip.setAttribute('aria-hidden','true');
    cur = null;
  }
  document.addEventListener('mouseover', function(e){
    var el = e.target.closest ? e.target.closest('.nm') : null;
    if (el) { if (el !== cur) show(el); }
    else if (cur && !cur.matches(':focus')) hide();
  });
  document.addEventListener('focusin', function(e){
    var el = e.target.closest ? e.target.closest('.nm') : null;
    if (el) show(el); else if (cur) hide();
  });
  document.addEventListener('keydown', function(e){ if (e.key === 'Escape') hide(); });
  window.addEventListener('scroll', function(){ if (cur) place(cur); }, {passive:true});
  window.addEventListener('resize', hide);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…