Search code examples
dojodojox.mobile

Dojo Mobile Scrollableview : How to animate and scroll to top?


    require(["dojox/mobile/parser", "dijit/registry", "dojo/domReady!"], function(parser, registry) {
        var view = registry.byId("myId");
        view.scrollTo({x:0 ,y: 0});
    });

The above piece of code scrolls to the top. But there is no animation.
Any suggestion how to animate and scroll to top?


Solution

  • you can use slideTo() method provided by scrollableView.