markgfx8
Members
-
Joined
-
Last visited
Reputation Activity
-
markgfx8 reacted to danners2003 in What do you do?Long walks, somewhere peaceful. Drinking only makes things worse (for me). Depends how much your struggling I suppose.
Exercise is obviously the best way to deal with this, as we spend all day up in our head we need to move our body - but it's been said so many times I wanted to share my favorite way.
I live by the sea, out in the country so it's really nice here of an evening.
-
markgfx8 reacted to fleur in Trigger auto height blocks in page scrollingI found this awesome script and it works perfect for my layout. But when i tested page with scrolling effect on smartphone i saw that the height of my content in sections is more then height of this section itself. I tried to make height responsive (height: auto;), but my scrolling works only with fixed height. I like this script and want it in my layout. I can't understand why this code (exactly var pos) didn't trigger my auto height.
$(function() { var $window = $(window); $('.next').on('click', function(){ $('section').each(function() { var pos = $(this).offset().top; if ($window.scrollTop() < pos) { $('html, body').animate({ scrollTop: pos }, 1000); return false; } }); }); $('.previous').click(function(){ $($('section').get().reverse()).each(function() { var pos = $(this).offset().top; if ($window.scrollTop() > pos) { $('html, body').animate({ scrollTop: pos }, 1000); return false; } }); }); }); var pos = $(this).offset().top; this is offset from previous section. Why programm don't want to understand the auto height? I can't understand.
Any ideas more then welcome. I will be greatfull for every advice and explanation wich point me to the right direction.
Thank you!
See whole script in the active link above this post.