-
Notifications
You must be signed in to change notification settings - Fork 423
Fix value of 'speed' when set default is 'auto' #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thanks for this. I'll have to test the effect of your change when I get a chance. I'm also going to leave a couple line notes on the pull request diff. I don't entirely understand what you mean by "Now, when I used it on Ipad2, sometime, it do not work when click next action to scroll." Questions:
|
jquery.smooth-scroll.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why wrap the value in parentheses?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:) We can remove parentheses
Only use: var delta = aniProps[scrollDir] - $scroller.scrollTop();
I wrap the value in parentheses because, for me understand that: it is one value.
|
Back to my question relate to IPad2. 1/ "Now" it is before my changed and after my change.
{/code} However, I have new idea about it. you can see : {code} Replace line from 183 to 189. |
|
I update code by your comment in this committed: focusjs@bd573bb |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion for comment text:
//'delta' is a storage variable for the difference in offsets between // $scroller.scrollTop() , and aniProps[scrollDir] .
|
I hate to see a pull request rot, despite it being a minor functionality change. @kswedberg: Is there nothing missing before this can be merged, or is it not worth fiddling with and should be just closed (been open for almost 2 years) ? |
* Improve docs:
* Add index.html, auto-generated by a grunt task
* Note that smooth-scrolling to `<a name="foo">`
doesn't work with $('a').smoothScroll(); must use
$.smoothScroll() inside event handler instead.
* Add note about beforeScroll callback
* Clean up options object comments
* Clean up defaults object comments
* Rename (deprecated) component.json to bower.json
* Add preventDefault option and bump to 1.4.11.
* Closes kswedberg#44
* Add syntax highlighting for index.html
* Ensure scrollable element is set with proper direction
* Bumped version and updated dist files
* Update bbq demo
* Add "options" argument feature to get/set options after init
* Build files and bump version
* Update jquery.js
* Readme: Add note about setting options after init
* Avoid "Cannot call method 'replace' of undefined" error
* Update bower.json, package.json
* Fix value of 'speed' when set default is 'auto'. Closes kswedberg#33
* Make jshint stricter and cleanup lint warnings
* Fix misspelling of autoCoefficient
* Release 1.5.0
* Avoid false positive on pathMatch when filtered link.pathname is empty string. Fixes kswedberg#64.
* Clean up package.json and Gruntfile.js and build files
* Release 1.5.1
* Update docs & fix out-of-sync versions for bower.json and jquery config json
* Indentation only
* Make plugin UMD-compliant (works with AMD, CommonJS, or neither). Clean up Gruntfile.
* Make plugin name consistent across package managers (and across my plugins)
* Escape slashes in hash. Fixes kswedberg#66.
* Release 1.5.4
* Add proper commonjs support. Closes kswedberg#74
* Add commonjs to build process and bump.
* Update readme with link to demo
* Remove moot `version` property from bower.json
Per bower/spec@a325da3
Also their maintainer says they probably won't ever use it: http://stackoverflow.com/questions/24844901/bowers-bower-json-file-version-property
* Remove bower.json from list of files to be revved on grunt version
* Add a few tests (finally). Many more needed.
* Remove smooth-scroll.jquery.json. No longer used.
* Add check for `document.scrollingElement`
* See https://dev.opera.com/articles/fixing-the-scrolltop-bug/
* Bower is dead. Long live npm.
* Ensure variable [scrollDir]() is used, not scrollTop(). Use Math.ab() instead of multiply by -1 if negative.
* Release 1.5.7
* Add optional support for event delegation
* Update docs and minor bump
* Request window location on every click.
* Since history.pushState exists, the location can change without a page reload.
* So, need to check link href against window.location href every time.
* Closes kswedberg#89
* Update grunt plugins and bump version.
* Add grunt-jscs task
* Lint files with both jshint and jscs.
* Add contributing guidelines
* Add devel: true to jshint options
* Make plugin work in Firefox when CSS has `html {scroll-behavior: smooth;}`
* Update demos
* Fix uglifying.
* Build and bump to 1.6.2.
* Put Bower support (bower.json) back in. Fixes kswedberg#91
* Fix version from bad tag
* Bump for bower support and bad tag fix
* Ensure links to nonexistent elements don't trigger scroll. Fixes kswedberg#92.
* Add link to nonexistent element to demo and tests for avoiding scroll (and for scroll).
* Gruntfile: fix grunt-version config so everything gets correct version.
* Build and bump to 1.7.2.
* Update readme with a couple examples
I fixed problem about 'speed' when set default it is 'auto'.
speed very slow when move scroll has delta is small. But it very quickly when go to bottom to top because it has value is 0.
speed calculate by delta of scroll move. So it always run normally, not quickly/slow when move scroll.
See test: http://svbuichu.com/javascript/ipad-test/
Other problem I found:
Now, when I used it on Ipad2, sometime, it do not work when click next action to scroll.