„MediaWiki:Common.js” változatai közötti eltérés
Innen: Sanctum2 Wikipédia
Ugrás a navigációhozUgrás a kereséshez
Nincs szerkesztési összefoglaló |
Nincs szerkesztési összefoglaló |
||
| 12. sor: | 12. sor: | ||
$(this).toggle($(this).text().toLowerCase().indexOf(value) > -1); | $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1); | ||
}); | }); | ||
}); | }); | ||
}); | }); | ||
A lap 2024. június 24., 08:27-kori változata
// MediaWiki:Common.js
$(document).ready(function() {
// Add search box with styled input
$('table.wikitable').before('<div id="searchBox" style="margin-bottom: 10px; padding: 10px; background-color: #333; border-radius: 5px;">' +
'<label for="tableSearch" style="color: #fff; font-size: 1.2em; margin-right: 10px;">Keresés név alapján:</label>' +
'<input type="text" id="tableSearch" placeholder="Írd be a tárgy nevét..." style="padding: 5px; border-radius: 5px; border: 1px solid #72716F; color: #333;">' +
'</div>');
$('#tableSearch').on('keyup', function() {
var value = $(this).val().toLowerCase();
$('table.wikitable tr').filter(function() {
$(this).toggle($(this).text().toLowerCase().indexOf(value) > -1);
});
});
});