Smooth scrolling for chrome browser (it's less than 2 KB)
Just inlcude the js, you are done!
<script src="path/to/chromeSmoothScroll.js"></script>
http://habibhadi.com/demo/chromeSmoothScroll/
If you want to turn smooth scrolling for specific OS then you may try like this -
var OS = {
isWindows: function(){ return navigator.appVersion.indexOf("Win")!=-1 },
isMac: function(){ return navigator.appVersion.indexOf("Mac")!=-1 },
isUnix: function(){ return navigator.appVersion.indexOf("X11")!=-1 },
isLinux: function(){ return navigator.appVersion.indexOf("Linux")!=-1 },
name: function(){
var name = '';
if(OS.isWindows()) name = "windows";
else if(OS.isMac()) name = "macosx";
else if(OS.isUnix()) name = "unix";
else if(OS.isLinux()) name = "linux";
return name;
}
};
if( OS.name() == 'windows' ) {
// this function called at the end of the js file!
chromeSmoothScroll.init();
}