滚动场景中的Jquery.address页面跳转问题:$ .address.wrap()? [英] Jquery.address page jump issue in scrolling scenarios: $.address.wrap()?

查看:152
本文介绍了滚动场景中的Jquery.address页面跳转问题:$ .address.wrap()?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用jquery.address的包装"方法?

How to use the "wrap" method of jquery.address?

我正在尝试避免在调用$.address.change(fn)时页面滚动跳跃. Jquery.address#添加到我的URL中,因此默认情况下页面突然滚动到顶部...哦,这让我发疯..

I'm trying to avoid page scrolling jump when i call the $.address.change(fn). Jquery.address add # to my url so by default page suddenly scroll to top... ooh this drive me crazy..

$.address.wrap()返回:布尔值 提供包装模式的状态.默认情况下处于禁用状态.

$.address.wrap() Returns: Boolean Provides the state of the wrap mode. Disabled by default.

$.address.wrap(value)返回:jQuery地址 启用或禁用自动换行模式,该模式可以在页面内容周围生成DIV包装器,并解决由于使用哈希片段而导致的滚动问题.

$.address.wrap(value) Returns: jQuery Address Enables or disables the wrap mode which generates a DIV wrapper around the page content and fixes any scroll issues caused by the use of hash fragments.

推荐答案

我以前从未使用过wrap(),但是避免在$.address.change(fn)末尾使用return false;滚动.

I have never used wrap() before, but avoided scrolling with return false; at the end of the $.address.change(fn).

这篇关于滚动场景中的Jquery.address页面跳转问题:$ .address.wrap()?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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