Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function filter_blocks_thematique() {
- $('.section, .card-trainer').each(function (index) {
- $(this).removeClass('hidden');
- if (!$(this).hasClass(slugThematique))
- $(this).addClass('hidden');
- $(this).parent().parent().parent().prev("h2").addClass('hidden');
- });
- $('.title-filter').html("<h2>" + title_filter + "</h2>");
- }
- var $quicksearchFilters = $('.filters-by-thematique a').click(function () {
- $('.dropdown-button.thematiques').html(default_text_thematique);
- $(this).parent().parent().parent().find('.dropdown-button').html($(this).html() + '<i class="fa fa-angle-down arrow-icon"/>');
- qsRegex = new RegExp($(this).attr('href').substr(1), 'gi');
- slugThematique = $(this).attr('href').substr(1);
- title_filter = $(this).html();
- if ($(this).attr('href').substr(1) !== 'all') {
- filter_blocks_thematique();
- } else {
- $('.section, .card-trainer').removeClass('hidden');
- $('h2').removeClass('hidden');
- $('.title-filter').addClass('hidden');
- }
- return false;
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement