4,090
edits
No edit summary |
No edit summary |
||
Line 463: | Line 463: | ||
filtersDiv.css('display', 'grid').hide().slideDown(100); | filtersDiv.css('display', 'grid').hide().slideDown(100); | ||
$(this).text('[FILTER]'); | $(this).text('[FILTER]'); | ||
// Attach click handler to document | // Attach click handler to document | ||
$(document).on('mousedown.hideFilters', function(event) { | $(document).on('mousedown.hideFilters', function(event) { | ||
Line 474: | Line 473: | ||
}); | }); | ||
$('.general-toggle').text('[FILTER]'); | $('.general-toggle').text('[FILTER]'); | ||
// Remove the document click handler | // Remove the document click handler | ||
$(document).off('mousedown.hideFilters'); | $(document).off('mousedown.hideFilters'); | ||
Line 484: | Line 482: | ||
}); | }); | ||
$(this).text('[FILTER]'); | $(this).text('[FILTER]'); | ||
// Remove the document click handler | // Remove the document click handler | ||
$(document).off('mousedown.hideFilters'); | $(document).off('mousedown.hideFilters'); | ||
Line 645: | Line 642: | ||
$(window).on('scroll', function() { | $(window).on('scroll', function() { | ||
var filtersDiv = $('#filters'); | var filtersDiv = $('#filters'); | ||
if (filtersDiv.hasClass('is-visible')) { | if (filtersDiv.hasClass('is-visible')) { | ||
Line 653: | Line 649: | ||
}); | }); | ||
$('.general-toggle').text('[FILTER]'); // Update the toggle button text | $('.general-toggle').text('[FILTER]'); // Update the toggle button text | ||
} | } | ||
}); | }); |