Put your if condition inside the scrolling event handler, otherwise which will only executed once when the dom elements are loaded.
$(document).ready(function(jQuery) {
var nav = $('.navigation-holder');
$(window).scroll(function() {
if ($(this).scrollTop() > 125) {
nav.addClass("fix");
} else {
nav.removeClass("fix");
}
if ($(".menu-item-95").hasClass("act")) {
$(".fix").addClass("darkmenu")
}
});
});
There is no need of ""
for the document