last day (14 days later) » 

10:13 AM
Hi there!
When I scroll, it paints the right div, but on the next scroll, it paints the entire parent container in red. Probably due to the closest() command
It's like painting the element, [I'm scrolling], painting the parent [I'm scrolling..] painting the right element.
 
Hey there! Let me have a look quick
 
Does the parent container also have the class "item"?
 
let me check
no
called "timeline"
 
Because this line $('.item').each(function(){ ... should only be selecting the elements you want to check
 
10:19 AM
I know
Let me see if I can' sport something
ok I think I found the issue
a sec
no idea
Do your thing, I'll take a minute or two to look at the code again
 
Thanks, I'm just popping out for lunch I'll be back in about 30 minutes then I'll have a look
 
ok
thanks a lot!!
I think the problem is with position, we should use offset
yep that's solve that
 
10:41 AM
Brilliant, glad you came right!
 
Yes, because my container was below the half of the page, that's why it didn't work
Thanks a lot my friend!
 

last day (14 days later) »