4,554
edits
No edit summary |
No edit summary |
||
Line 582: | Line 582: | ||
}); | }); | ||
function | function logCardsWithTypeAndSubject(typeValue, subjectValue) { | ||
$('.card').each(function() { | |||
var typeText = $(this).find('.type').text().trim(); | |||
var subjectText = $(this).find('.subject').text().trim(); | |||
if (typeText === typeValue && subjectText === subjectValue) { | |||
// Log the card or perform any action. Here we log the card's details. | |||
var titleText = $(this).find('.title').text().trim(); | |||
console.log('Card with type "Book" and subject "Activism": ' + titleText); | |||
} | |||
}); | |||
} | |||
// Call the function to log cards with the type "Book" and subject "Activism" | |||
logCardsWithTypeAndSubject('Book', 'Activism'); | |||
}); | }); |