javascript - Ionic Scroll to Element -


i have with:

<span id="quote-{{quote.id}}" ng-repeat="quote in quotes">{{quote.text}}</span> 

i'm trying have index scroll part of scroller using:

$scope.jumptoquote = function (quote) {   $scope.quoteselected = quote;   var quoteposition = $ionicposition.position(angular.element(document.getelementbyid('quote-'+quote)));   $ionicscrolldelegate.$getbyhandle('quotes-box').scrollto(quoteposition.left, quoteposition.top, true); } 

however value of quoteposition.top equals 10 top-offset of <ion-scroll>.

as far see, need replace document.getelementbyid('quote-'+quote) document.getelementbyid('quote-'+quote.id) , concatenating whole quote object instead of it's id.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -