ページを上下に移動するとサイズが変更されるナビゲーション バーがあります。ページの上部では、縮小するべきではありませんが、縮小します。ユーザーがページの上部にいるかどうかを確認し、ナビゲーション バーを縮小しないようにする必要があります。コードは次のとおりです。
<script type="text/javascript">
$('#brand_logo').on('inview mouseenter', function(event, visible) {
if (visible === true) {
console.log("I got my eye on it Charlie");
$("#topnav").animate({
opacity: 1.0,
width: '98%',
height: '38px'
});
// $(".head-wrap-left").hide();
} else {
console.log("Let's set the mood.");
$("#topnav").animate({
opacity: 0.9, //0.6 original
width: '310px',
height: '33px'
});
$("#topnav_behind").slideUp();
$('#topnav').bind({
mouseenter: function() {
$("#topnav").animate({opacity: 1.0, width: '98%', height: '38px'});
},
mouseleave: function() {
$("#topnav").animate({opacity: 0.9, width: '310px', height: '33px'});
}
});
}});
</script>