Hi all,
I have some animations running on my website, on the very beginning of the script I define some locations for them. Is there a way to only run that function when the page is loaded, and the user sees the top of the page (it's a 1 page website, very long page)
Because I want to ignore those defined positions when the user reloads the page halfway through.
This is the tiny function that I only want to run in the case I described before. I'm soooo new with this but - is there sth like -- if window scrollTop = 0?
Thanks!
- $(function(){
- $('#cases2').css('left',960);
- $('.fork').css('left',-60);
- $('.knife').css('left',960);
- $('.dienst1').css('left',-40);
- $('.dienst2').css('left',40);
- $('.dienst4').css('left',780);
- $('.dienst5').css('left',855);
- $('#tour-bg').css('opacity',0);
- $('.tour-text').css('opacity',0);
- $('#tour-btn').css('opacity',0);
- });