Domanda

I have tried here myjsfiddle
I am trying to show login section when user clicks any link on the home page. I will show the home page again when user clicks on logo which is there in the header.
The problem is if the scroll down on the home page and click any link then the in the login section also scroll downed I want to scroll to the top of the login section How to do that here.
Script is here :

var kendoMobileApplication = 
    new kendo.mobile.Application($(document.body),{ skin: 'flat' });



$('.homePage-nav-menu-list >li>a').click(function(){
    $('.homePage-nav-menu-list').hide();
    $('.loginSec').show();
});

$('.logoImg').click(function(){
    $('.homePage-nav-menu-list').show();
    $('.loginSec').hide();
});
È stato utile?

Soluzione

You need to use reset() method on scroller().

var app = new kendo.mobile.Application();
app.scroller().reset();

Reference: http://docs.telerik.com/kendo-ui/api/mobile/application#methods-scroller

Demo

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top