<commit_before>if (typeof jQuery === "undefined") { throw new Error("Marky requires jQuery") }

// User interactions with Marky
$(document).ready(function() {
    $("body").load(function() {
        $("body").fadeIn("400");
    });
});<commit_msg>Added a nice effect when selecting an item from the menu<commit_after>if (typeof jQuery === "undefined") { throw new Error("Marky requires jQuery") }

// Global variables
var links = [
    [
        "intro-link",
        "basics-link",
        "headers-link",
        "links-link",
        "codes-link",
        "lists-link",
        "quotes-link",
        "images-link",
        "paragraphs-link",
        "play-link"
    ],
    [
        "subtopic-1",
        "subtopic-2",
        "subtopic-3",
        "subtopic-4",
        "subtopic-5",
        "subtopic-6"
    ]
];

// Functions
function resetThenColor(element) {
    var listIndex = 0;

    // Check which nav list is the selected element in
    if (element.indexOf("subtopic") > -1) { listIndex = 1; } // Selected element is in the subtopic nav list

    for (var counter = 0; counter < links[listIndex].length; counter++) {
        $("#" + links[listIndex][counter]).css("border-bottom-color", "#ffffff");
        $("#" + links[listIndex][counter]).css("cursor", "pointer");
    }

    $(element).css("border-bottom-color", "#1c9041");
    $(element).css("cursor", "initial");
}

// User interactions with Marky
$(document).ready(function() {
    $("body").fadeIn("400");

    // Make the selected <li> 'active'
    $("li").click(function() {
        var li_ID = $(this).attr("id");
        resetThenColor("#" + li_ID);
    });
});
{'fraction_non_alphanumeric': 0.18925518925518925, 'fraction_numerical': 0.01282051282051282, 'mean_word_length': 2.6341463414634148, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1258200', 'n_tokens_mistral': 519, 'n_tokens_neox': 501, 'n_words': 115}