Jump to content

MediaWiki:Vector.js: Difference between revisions

From Hasan Wiki
Created page with "All JavaScript here will be loaded for users of the Vector skin: $(function () { var categorySection = $('#p-Categories'); if (!categorySection.length) { return; } var categoryTitle = categorySection.find('.vector-menu-heading'); categoryTitle.css({ 'cursor': 'pointer', 'user-select': 'none' }); categoryTitle.on('click', function () { categorySection.toggleClass('categories-open'); }); });"
 
No edit summary
Line 1: Line 1:
/* All JavaScript here will be loaded for users of the Vector skin */
/* All JavaScript here will be loaded for users of the Vector skin */
$(function () {
 
     var categorySection = $('#p-Categories');
     var categorySection = $('#p-Categories');


Line 17: Line 17:
         categorySection.toggleClass('categories-open');
         categorySection.toggleClass('categories-open');
     });
     });
});

Revision as of 11:47, 22 August 2026

/* All JavaScript here will be loaded for users of the Vector skin */

    var categorySection = $('#p-Categories');

    if (!categorySection.length) {
        return;
    }

    var categoryTitle = categorySection.find('.vector-menu-heading');

    categoryTitle.css({
        'cursor': 'pointer',
        'user-select': 'none'
    });

    categoryTitle.on('click', function () {
        categorySection.toggleClass('categories-open');
    });