var _setMatchedContractScrolling = function() { $('#left').on('scroll', function() { $('#right').scrollTop($(this).scrollTop()); }); };
How would I do this the Angular way?
Many thanks in advanceJeremyDefine a new class directive. (Sounds reasonable)
Put the two table divs inside an outer div having this directive as a class. (Started losing me at "...as a class.")
In the directive's link function, call "ch = elem.children()", and keep "table1 = ch[0]; table2 = ch[1]". (Clarify what you mean by "keep"?)
Then handle the scroll event on them:
"table1.bind("scroll", function(event) { .... });" (Just not following this terminology... "handle ... on them"? Worse, you leave out the part those of us switching from jQuery to Angular most need to see; the logic.)