MediaWiki:Common.js: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 619: Line 619:
    // Show only the alphabetical block
    // Show only the alphabetical block
    $(".block-view > div").hide();
    $(".block-view > div").hide();
    $(".alphabetical-block").show();
});
// Homepage toggle buttons
// Handle Block View Button in home
$(".block-view-button").click(function() {
    // Show block view and block sorting buttons, hide list view and list sorting buttons
    $(".home-block-view").show();
    $(".home-list-view").hide();
    $(".block-sorting-buttons").css('display', 'flex');
    $(".list-sorting-buttons").hide();
    $(".home-block-view > div").hide();
    $(".chronicle-block").show();
});
// Handle List View Button in home
$(".list-view-button").click(function() {
    // Show list view and list sorting buttons, hide block view and block sorting buttons
    $(".home-list-view").show();
    $(".home-block-view").hide();
    $(".list-sorting-buttons").show();
    $(".block-sorting-buttons").hide();
    $(".home-list-view > div").hide();
    $(".chronicle-list").show();
});
// Handle List Sorting Buttons in home
$(".chronicle-list-button").click(function() {
    // Show only the chronicle list
    $(".home-list-view > div").hide();
    $(".chronicle-list").show();
});
$(".random-list-button").click(function() {
    // Show only the random list
    $(".home-list-view > div").hide();
    $(".random-list").show();
});
$(".alphabetical-list-button").click(function() {
    // Show only the alphabetical list
    $(".home-list-view > div").hide();
    $(".alphabetical-list").show();
});
// Handle Block Sorting Buttons
$(".chronicle-block-button").click(function() {
    // Show only the chronicle block
    $(".home-block-view > div").hide();
    $(".chronicle-block").show();
});
$(".random-block-button").click(function() {
    // Show only the random block
    $(".home-block-view > div").hide();
    $(".random-block").show();
});
$(".alphabetical-block-button").click(function() {
    // Show only the alphabetical block
    $(".home-block-view > div").hide();
    $(".alphabetical-block").show();
    $(".alphabetical-block").show();
});
});


});
});

Navigation menu