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

swift - Button on Table View Cell connected to local function -

dns - Dokku server hosts two sites with TLD's, both domains are landing on only one app -

c# - ajax - How to receive data both html and json from server? -