We are again back with another interesting miniature javascript called the “df Smooth Scroll“. This script is also one of the smallest Smooth Scrolling Javascripts after our Simple Accordions.
We always see that we have atleast one image on every post of ours… but for this script we were too confused to go about the image and finally put up the above one (sorry if it pains your eyes cos its motion blurred )
Usage: This script is too simple to understand and use. Nothing but playing with Anchor Tags. Include the Javascript and you are set to smoooooooooth scroll…
| Attachment | Size | Hits | Last download |
|---|---|---|---|
| dfSmooth Scroll | 5.66 KB | 70846 | 1 hour 25 min ago |
Comments
love you. thanks a lot (from italy)
This is such a nice and easy to use script. Thank you! You have a bunch of cool stuff on your site!
howdy everyone.As I said, Now i am the following so you may relax now, or not as you see fit. WOW! What is wrong with this guy? Wonderful now I am asking myself concerns. Hope I can answer them.
hey there blokes, great discussion board you acquired at this point. im new and happy to be here.
to the previous poster...This site was written 2 years ago. Do you regularly monitor every thing you did 2 years ago ?
He probably wrote it and forgot about it...As you should
Does this person respond to ANY of his fucking comments?? wtf?? why have a site where you offer something if you don't keep up on it and take some responsibility....Developers like you should just go away...
hi, how can i call the function directly from a button or link, passing in an anchor?
thank!
Great script, but it has a problem with scroll height if you use a maximized browser with a height of 1050. I looked into it, and the problem is the way that the motion is calculated when the inner height is greater than the scroll Height minus the distance traveled (which should probably only happen when the scroll distance is very small or the browser is very large). The issue is that the effective equation of (d-a-(h-d)) or (a-h) (where d is the distance to travel, a is the current page position, and h is the scroll height) is useful when the distance is very small, but ends up being a large positive number when the distance is large. I'm not sure of the appropriate solution, but a quick fix is to remove i and the entire second if clause from the scroll(d) function, and just use same equation for all parts where d>a. For an example of this script with the 4 lines removed, look here : http://www.colorado.gov/cms/js/sipaNewSite/scroller.js
Incidentally, if you remove those 4 lines, the page will fail to scroll IF the browser height is in the range of about 3000 pixels. I'm not sure how many of us have 3000p screens, so I figured it's not an issue for a little while. If someone comes up with a better solution, I'm all ears.
Hope this helps anyone who's having the same problem of "Sometimes the page scrolls to the wrong place, even when testing on the same browser version on different machines, or even sometimes on the same machine"
BTW, your captcha is broken.
You beaut!
Was just racking my brain on that particular conundrum and decided to look at the comments panel. Thanks very much Joe. I think 3000px high screens won't be commonplace for another few years, at least for browsing the web with.
Thanks again.
Hi dezignerfolio,
How to use smoothscroll.js with a
Tx a lot.
Post new comment