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

99
Views
Isotope filter isn't working, all items disappears when I click

I'm learning web development. Currently, I'm at the very beginning stage. Suddenly I'm facing a problem with 'isotope filter'. The filter isn't working. All my grid items are showing first. But whenever I clicked on another button all items disappear immediately. I was trying to filter all items into different sections under the different buttons. Maybe I was unable to explain my problem properly, still, can anyone help me to fix my problem?

var filter_btn = document.querySelectorAll(".filter-btn");

filter_btn.forEach((btn) => {
btn.addEventListener("click", () => {
  filter_btn.forEach((button) => button.classList.remove("active"));
  btn.classList.add("active");

  let filterValue = btn.dataset.filter;
  $(".grid").isotope({filter: filterValue});
});
});

$('.grid').isotope({
    itemSelector: '.grid-item',
    layoutMode: 'fitRows',
    transitionDuration: "0.6s"
  });

about 4 years ago · Santiago Trujillo
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!