I Trying to use the scroll to element function in the jquery mobile Iscroll
But its not working
This is what my script looks like
I tried here MyJsfiddle
http://jsfiddle.net/cX4bk/
$('.chequeBanks').click(function(){
$(".scroll-wrapper").iscrollview('refresh');
var bankId=$(this).val();
$('.accNumber').html($('.chequeBankDetailsSec .bankId-'+bankId+' .number').html());
$('.details').show();
$('.details').show();
var x = $('.details').offset().left;
var y = $('.details').offset().top;
$(".scroll-wrapper").iscrollview("scrollTo", x,y, '1');
});
The scrollToElement() function exists for this purpose. You just need a selector that will select the element you want to scroll to. Don't try to do it yourself by calculating position and using scrollTo().
I Trying to use the scroll to element function in the jquery mobile Iscroll But its not working This is what my script looks like I tried here MyJsfiddle http://jsfiddle.net/cX4bk/
$('[data-role="content"]').trigger('create'); $(".scroll-wrapper").iscrollview(); $(".scroll-wrapper").iscrollview('refresh');