Here you go Dave, or future Googlers:
Sync all divs with a class: http://jsfiddle.net/x99zqogy/
Sync a child div based on it's name: http://jsfiddle.net/8vsofu5j/
Hope that helps someone.
-pb
On Wednesday, June 18, 2014 5:41:57 PM UTC-6, David Roberson wrote:
>
> It's nice to know that someone was able to answer the question; but
> honestly, I would not call this an answer. It assumes the reader is
> knowledgeable and experienced in writing angular directives, able to put it
> all together from these vague references. I know it's been a while, but
> this is the only "on topic" post I can find on this subject using Google,
> so it's be really helpful if someone who does get it, could post a working
> jsfiddle or something. It's easy to find jQuery but I needed to do this in
> Angular.
>
> Thanks.
>
> Define 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.)
>>
>
>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.