Enter-view.js Demo

Start scrolling to see examples.

Default (no offset)

						enterView({
							selector: 'block-a',
							trigger: function(el) {
								el.classList.add('entered');
							}
						});
					

.block-a

30% offset

						enterView({
							selector: 'block-b',
							offset: '25%',
							trigger: function(el) {
								el.classList.add('entered');
							}
						});
					

.block-b

100% offset

						enterView({
							selector: 'block-c',
							offset: '100%',
							trigger: function(el) {
								el.classList.add('entered');
							}
						});
					

.block-c

Multiple elements, 50% offset

						enterView({
							selector: 'block-d',
							offset: '50%',
							trigger: function(el) {
								el.classList.add('entered');
							}
						});
					

.block-d

.block-d

.block-d