平滑滚动插件不允许我向下滚动页面 [英] Smooth scroll plugin not allowing me to scroll down page

查看:393
本文介绍了平滑滚动插件不允许我向下滚动页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在github插件中添加了平滑滚动效果。

I added in the github plugin for the smooth scroll effect.

github.com/simov/simplr-smoothscroll

github.com/simov/simplr-smoothscroll

我在呼叫中添加了效果:

I added in the call outs for the effect:

<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.0.6/jquery.mousewheel.min.js"></script>
<script src="http://simov.github.io/simplr-smoothscroll/lib/jquery.simplr.smoothscroll.js"></script>

然后我为效果添加了这个代码:

Then I added this code for the effect:

$(function () { $.srSmoothscroll() });

完成此操作后,我的网页不再向下滚动。它只向上滚动。为什么这个功能无法正常运作?

After I did this, my page no longer scrolls down. It only scrolls up. Why is this not functioning correctly?

我在网站上添加的网站是这个网页:

The site I added this on is this page from the site:

http://realtorcatch.com/test_index

我我想要模仿:

http ://www.templatemonster.com/demo/51054.html

在github网站上,它的用法是:

On githubs site, it says the usage is this:

$(function () {
 $.srSmoothscroll({
    // defaults
    step: 55,
    speed: 400,
    ease: 'swing',
    target: $('body'),
    container: $(window)
  })
})

这对我的情况没有帮助。

It does not help my situation though.

有没有任何想法,为什么这不是向下滚动?

Does anyone have any ideas to why this is not scrolling down?

推荐答案

=http://foundation.zurb.com/ =nofollow> Zurb基金会框架和 标准设置 > $。srSmoothscroll()更改 body {height:100%} } 。这解决了我在chrome47(win7 / osX 10.9)的问题。或者更改目标选项参数以使用包装器div:

I had the same problem with Zurb's Foundation Framework and the standard settings from $.srSmoothscroll() change body { height:100% } in your CSS file to body { height: auto }. This fixed the issue for me on chrome47 (win7/osX 10.9). Or change the target option parameter to use a wrapper div:

$.srSmoothscroll({
    target: $('wrapper')
});

这篇关于平滑滚动插件不允许我向下滚动页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆