Download the X Distribution File.
xa.scroll(e, x, y, t[, a[, b[, oe]]]);
// xAnimation.scroll r3, Copyright 2006-2010 Michael Foster (Cross-Browser.com) // Part of X, a Cross-Browser Javascript Library, Distributed under the terms of the GNU LGPL xAnimation.prototype.scroll = function(e,x,y,t,a,b,oe) { var i = this; i.axes(2); i.init(e); i.win = i.e.nodeType==1 ? false:true; i.a[0].i = xScrollLeft(i.e, i.win); i.a[1].i = xScrollTop(i.e, i.win); // initial position i.a[0].t = Math.round(x); i.a[1].t = Math.round(y); // target position i.init(e,t,h,h,oe,a,b); i.run(); function h(i) { // onRun and onTarget var x = Math.round(i.a[0].v), y = Math.round(i.a[1].v); if (i.win) i.e.scrollTo(x, y); else { i.e.scrollLeft = x; i.e.scrollTop = y; } } };
xanimation.html - Start page of all xAnimation demos.
By your use of X and/or CBE and/or any Javascript from this site you consent to the GNU LGPL - please read it. If you have any questions about the license, read the FAQ and/or come to the forums.
Forum support is available at the X Library Support Forums.
Cross-Browser.com is the home of X - a cross-browser Javascript library, and many demos, applications, articles and documentation.
If you are using X, XC or anything from this site, show off your work by posting a link in the X Showcase forum.