css filtre, js type ressources
This commit is contained in:
@@ -141,7 +141,19 @@ jQuery(function ($) {
|
||||
});
|
||||
console.log("classses media");
|
||||
|
||||
// MASQUER TYPE DE RESSOURCE DOUBLON
|
||||
if (document.body.classList.contains("path-ressources")) {
|
||||
$(".view-type-slide").each(function () {
|
||||
const h3Content = $(this).find("h3").text().trim();
|
||||
console.log(h3Content);
|
||||
$(this).find(".field--name-field-type-de-ressource .field__item a").each(function () {
|
||||
if ($(this).text().trim() === h3Content) {
|
||||
$(this).hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
// Ouvrir les liens externes dans un nouvel onglet
|
||||
document.querySelectorAll('a[href^="http"]').forEach(link => {
|
||||
@@ -165,14 +177,6 @@ jQuery(function ($) {
|
||||
}
|
||||
}
|
||||
|
||||
// MASQUER TYPE DE RESSOURCE DOUBLON
|
||||
$(".view-type-slide").each(function () {
|
||||
const h3Content = $(this).find("h3").text().trim();
|
||||
$(this).find(".field--name-field-type-de-ressource").each(function () {
|
||||
if ($(this).text().trim() === h3Content) {
|
||||
$(this).hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user