MediaWiki:Vector.js: verschil tussen versies

Uit Wildpluk wiki
(Nieuwe pagina aangemaakt met '→‎Alle hier geplaatste JavaScript-code wordt geladen voor gebruikers van de vormgeving Vector: window.onload = function() { // Get the current month (1-based) var n = new Date().getMonth() + 1; // Select the nth child of the element with class 'tabber__tabs' var element = document.querySelector('.pluktips .tabber__tabs :nth-child(' + n + ')'); // Trigger the click event if the element exists if (element) { element.click();...')
(geen verschil)

Versie van 27 mei 2024 01:36

/* Alle hier geplaatste JavaScript-code wordt geladen voor gebruikers van de vormgeving Vector */
window.onload = function() {
    // Get the current month (1-based)
    var n = new Date().getMonth() + 1;

    // Select the nth child of the element with class 'tabber__tabs'
    var element = document.querySelector('.pluktips .tabber__tabs :nth-child(' + n + ')');

    // Trigger the click event if the element exists
    if (element) {
        element.click();
    }
};