<commit_before>$( document ).ready(function() {
    $( ".dropdown-button, .dropdown-content" )
    .mouseenter(function() {
        $(".dropdown-content").css("display", "block");
    });
    
    $( ".dropdown-button, .dropdown-content" )
      .mouseleave(function() {
        $(".dropdown-content").css("display", "none");
    });
});



$( document ).ready(function() {
var $document = $(document),
       $element = $('#nav-main');
       
   $document.scroll(function() {
       if ($document.scrollTop() <= 200) {
           $element.stop().css({
               top: '0px'
           });
       } else {
           $element.stop().css({
               top: '-200px'
           });
       }
   });
});<commit_msg>Attempt to throttle is throttled<commit_after>$( document ).ready(function() {
    $( ".dropdown-button, .dropdown-content" )
    .mouseenter(function() {
        $(".dropdown-content").css("display", "block");
    });
    
    $( ".dropdown-button, .dropdown-content" )
      .mouseleave(function() {
        $(".dropdown-content").css("display", "none");
    });
});

function hideynav() {
    var $document = $(document),
        $element = $('#nav-main');
    if ($document.scrollTop() <= 200) {
        $element.stop().css({
            top: '0px'
        });
    } else {
        $element.stop().css({
            top: '-200px'
        });
    }
    console.log("Yup");
}

var scrollTimeout;
var throttle = 2000;

$( document ).ready(function() {
    $(window).on('scroll', function () {
        scrollTimeout = setTimeout(function () {
            hideynav();
            scrollTimeout = null;
        }, throttle);

    });
});

{'fraction_non_alphanumeric': 0.20906344410876132, 'fraction_numerical': 0.010876132930513595, 'mean_word_length': 2.066666666666667, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '3682072', 'n_tokens_mistral': 508, 'n_tokens_neox': 483, 'n_words': 81}