Monday, 28 October 2013

Scroll whole page , Ext js

Hi , during practicing I got very short code to make your page ( body ) scroll to some location , we have following options for this :

var body=Ext.getBody().el;

var el=Ext.getBody().el;
el.scrollBy(10, 10, true);
el.scrollBy([10, 10], true);
el.scrollBy({ x: 10, y: 10 }, true);
or you can use:
el.side, value, [animate] ) ; where side may be left or top , value is integer and true or false for animate or not.
And that's simply it :)