4,554
edits
No edit summary |
No edit summary |
||
Line 36: | Line 36: | ||
// Using delegated event handling for both #list and #list-list | // Using delegated event handling for both #list and #list-list | ||
$('#list, #list-list').on('mousedown', '.filtered-value-option', function(event) { | $('#list, #list-list').on('mousedown', '.filtered-value-option', function(event) { | ||
console.log("Filter clicked within context:", this); | |||
if ($(this).closest('#list').length) { | |||
console.log("Context: #list"); | |||
communityFeatured.hide(); | |||
console.log("Community Featured should now be hidden. Current display:", communityFeatured.css('display')); | |||
} else if ($(this).closest('#list-list').length) { | |||
console.log("Context: #list-list"); | |||
communityListFeatured.hide(); | |||
console.log("Community List Featured should now be hidden. Current display:", communityListFeatured.css('display')); | |||
} | |||
}); | |||
function formatParagraphs(text) { | function formatParagraphs(text) { |