tkahn / Smooth-Div-Scroll

A jQuery plugin for smooth scrolling. No longer maintained.
471 stars 184 forks source link

anybody used this in an angularjs app? #169

Open angelochen960 opened 10 years ago

angelochen960 commented 10 years ago

Hi, I tried to use this in an angularJS app, the page is inside a ng-view, using a directive :+1:

  .directive('smoothscroll', function() {
    return {
      restrict : 'A',
      link : function(scope, element, attrs) {
        element.smoothDivScroll({ autoScrollingMode: "onStart", hiddenOnStart: false, autoScrollingDirection:"endlessLoopRight"})
      }
    }
  });
    <div id="makeMeScrollable" smoothscroll >
      <img ng-src="images/tiles_0.jpg" />
      <img ng-src="images/tiles_1.jpg" />
   </div>

above code automatically scrolls in Firefox and Safari, but scrolling will not start in Chrome. in the FIrefox and Safari, when I click the other pages, then go back to the page of scrolling, it shows only the first image, and not scrolling, any idea why? Thanks