I'm here at work, and I have a problem here at the site I'm touching.
I have a side div that has a js code to stay fixed on the page (floating) as soon as it arrives in top0 (follow the link below) p>
$(function(){varjElement=$('.element');$(window).scroll(function(){if($(this).scrollTop()>835){jElement.css({'position':'fixed','top':'10px','width':'50%','margin-left':'50%',//'height':'1500px'});}else{jElement.css({'position':'relative','top':'auto','width':'50%','margin-left':'auto'});}});
Asthephotoontheleftcontinuestoscroll,therightdivisfixedonthescreen.
Theproblemisthat,whenitreachestheendoftheleftphoto,thedivcontinuesscrollingdown,causingittostepinfrontofthefooterandspoileverything.
How do I make the floating div on the right side stop as soon as the photo on the left is gone?
Help me, if I'm not going to get fired (joking) kk