4,456
edits
No edit summary |
No edit summary Tag: Reverted |
||
Line 64: | Line 64: | ||
} | } | ||
// Using delegated event handling for both #list | // Using delegated event handling for both #list #list-list #list-block-1, #list-block-2, #list-block-3, #list-list-1, #list-list-2, #list-list-3 | ||
$('#list, #list-list').on('mousedown', '.filtered-value-option', function(event) { | $('#list, #list-list, #list-block-1, #list-block-2, #list-block-3, #list-list-1, #list-list-2, #list-list-3').on('mousedown', '.filtered-value-option', function(event) { | ||
console.log("Filter clicked within context:", this); | console.log("Filter clicked within context:", this); | ||
var closestContext = $(this).closest('#list, #list-list, #list-block-1, #list-block-2, #list-block-3, #list-list-1, #list-list-2, #list-list-3'); | |||
console.log("Context: #list"); | |||
if (closestContext.is('#list, #list-block-1, #list-block-2, #list-block-3')) { | |||
console.log("Context: #list or blocks"); | |||
console.log("Before hiding, Community Featured display:", communityFeatured.css('display')); | console.log("Before hiding, Community Featured display:", communityFeatured.css('display')); | ||
console.log("After hiding, Community Featured display:", communityFeatured.css('display')); | console.log("After hiding, Community Featured display:", communityFeatured.css('display')); | ||
} else if ( | } else if (closestContext.is('#list-list, #list-list-1, #list-list-2, #list-list-3')) { | ||
console.log("Context: #list-list"); | console.log("Context: #list-list or list lists"); | ||
console.log("Before hiding, Community List Featured display:", communityListFeatured.css('display')); | console.log("Before hiding, Community List Featured display:", communityListFeatured.css('display')); | ||
console.log("After hiding, Community List Featured display:", communityListFeatured.css('display')); | console.log("After hiding, Community List Featured display:", communityListFeatured.css('display')); |