Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

230
Views
TypeError: $ no es una función. Qué significa eso

Estoy intentando esto en mi sitio web para que mi encabezado sea fijo pero se oculte mientras me desplazo. En la línea 4, recibo este error Uncaught TypeError: $ is not a function . No sé con qué me estoy metiendo.

 let didScroll; let lastScrollTop = 0; let delta = 5; let navbarHeight = $('header').outerHeight(); window.scroll(function(event){ didScroll = true; }); setInterval(function() { if (didScroll) { hasScrolled(); didScroll = false; } }, 250); function hasScrolled() { let st = this.scrollTop(); if(Math.abs(lastScrollTop - st) <= delta) return; if (st > lastScrollTop && st > navbarHeight){ $('header').classList.remove("nav-down").classList.add("nav-up"); } else { if(st + window.height() < document.height()) { $('header').classList.remove("nav-up").classList.add("nav-down"); } } lastScrollTop = st; }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!