How to use the "wrap" method of jquery.address
?
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() Returns: Boolean Provides the state of the wrap mode. Disabled by default.
$.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.
I have never used
wrap()
before, but avoided scrolling withreturn false;
at the end of the$.address.change(fn)
.