滚动页面时如何隐藏移动设备中的div

时间:2017-02-03 09:18:47

标签: jquery html

当我在具有社交图标的移动设备中滚动页面时,我想要隐藏顶部标题。 page url:http://gomodemo.se/port73/  我试过以下代码:

代码1。

<script>
jQuery(window).scroll(function ($) {
  var Bottom = $(window).height() + $(window).scrollTop() >= $(document).height();
if(Bottom )
{
$('#header_meta').hide();
}
});
</script>

代码2。

<script>
jQuery("window").scrollDown(function($){
    $("#header_meta").hide();
});
</script>

1 个答案:

答案 0 :(得分:0)

@media only screen and (max-width: 767px)
.responsive #header .social_bookmarks {
    padding-bottom: 2px;
    width: 100%;
    text-align: center;
    height: auto;
    line-height: 0.8em;
    margin: 0;
    display: none;
}

enter link description here

在媒体查询中输入display:none