html - jQuery scroll to a section and stick before continued scrolling -


not sure feature called, uses jquery's easing features. this site job of it. basically, auto scrolls the next section , sticks can view 1 part @ time. have section height part taken care of, i'm clueless on how call easing. research i've done relates sticky headers , sidebars. i'm not sure feature called!

here's jsfiddle: http://jsfiddle.net/y2utv/1/

here's js looks like:

$(window).resize(function(){     var windowheight = $(window).height();     $(.section).css(height, windowheight); }); 

you not passing jquery's css method variable declared. remove quotes around 'windowheight' , should work right away.

$(window).resize(function(){     var windowheight = $(window).height();     $('div.section').css('height', windowheight); });                                ^^^^^^^^^^^^                                    remove quotes 

http://jsfiddle.net/ax8xz/1/


i can give basic idea on how should implement want

with issue, going need differently named divs, you'll have single out each section somehow. adding id attribute easiest.

next, you'll need add event scroll() moves top of next div, whether or down either snap window position, or animate() it.

you'll need way track current positioned section can know move next during scroll() event.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -