Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

249
Vistas
Isotope Search Function Stopped Working After Applying Filter

So I have this unknown issue with my code, everything seems to be working fine; the search works, the filter works, but when I try to search after applying a filter, it no longer works.

$('.select').on('click', '.filter-dropdown', function() {
    var parent = $(this).closest('.select');
    if (!parent.hasClass('is-open')) {
        parent.addClass('is-open');
        $('.select.is-open').not(parent).removeClass('is-open');
    } else {
        parent.removeClass('is-open');
    }
}).on('click', 'ul>li', function() {
    var parent = $(this).closest('.select');
    parent.removeClass('is-open').find('.filter-dropdown').text($(this).text());

    $('.filter-item').removeClass('active');
    $(this).addClass('active');
    var selector = $(this).attr('data-filter');

    $('.japps-container').isotope({
        filter: selector
    });
    return false;
});

var qsRegex;
var japps = $('.japps').isotope({
    // options
    itemSelector: '.japps-item',
    layoutMode: 'fitRows',
    filter: function() {
        var $this = $(this);
        var searchResult = qsRegex ? $this.text().match(qsRegex) : true;
        return searchResult;
    }
});

var $quicksearch = $('.filter-search').keyup(debounce(function() {
    qsRegex = new RegExp($quicksearch.val(), 'gi');
    japps.isotope();
}, 1));

function debounce(fn, threshold) {
    var timeout;
    threshold = threshold || 100;
    return function debounced() {
        clearTimeout(timeout);
        var args = arguments;
        var _this = this;

        function delayed() {
            fn.apply(_this, args);
        }
        timeout = setTimeout(delayed, threshold);
    };
}

Please see the CodePen link below to see the full code.

Code: https://codepen.io/bonafideboss/pen/oNeyMbQ

I could not find the problem. Please advice. Thanks in advance.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda