SmoothScrollJS

Recently, I’ve started digging into JavaScript, which, for the most part is foreign territory. JavaScript is a very unique language – it’s come from the gutters of the proprietary ‘web 1.0′ to become the shining light of the new ‘accessible’ web. It’s also a language that I’ve not really been good with – most of my code is stumbling my way through, getting lucky after a million wrong turns.

However, since the release and adoption of JavaScript libraries, namely Prototype and Scriptaculous, I’ve finally been able to hop over the JavaScript learning curve. I’ve been doing more JS code both at work and at home, and creating some pretty cool effects.

So, for the first time ever, I am releasing a piece of code to the world. It’s being released under the MIT license, so you’re free to do just about anything with it, and it’s called SmoothScrollJS. Essentially, it’s an animated horizontal scroller, with left and right triggers for a smooth scroll effect. You can adjust the width, speed, and ’smoothness’.

It also includes a reporting tool, which helps take any guesswork out of the old, ‘just how long is the div’ question.

If you would like to check out the demo, go to: http://sandbox.ifeedfish.com/slider/

To download the source files, click here.

A permanent site is on the way, but the zip includes everything you should need to set something running. Check the readme for instructions for use. The code is an extension of the Prototype library, and needs Prototype 1.5.0 or newer to run.

Also, keep in mind I’m still pretty new to this JavaScript thing, and I’m sure there are efficiencies I’ve missed or ways I could have had cleaner code (and I’d love to hear about them), but it works cross-platform and it’s very lightweight.

0 Responses to “SmoothScrollJS”


  1. No Comments

Leave a Reply