Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to implement :not-in-viewport? #8

Open
phlegx opened this issue Mar 12, 2013 · 2 comments
Open

How to implement :not-in-viewport? #8

phlegx opened this issue Mar 12, 2013 · 2 comments

Comments

@phlegx
Copy link

phlegx commented Mar 12, 2013

Hi all!

How can I check if an object is not-in-viewport?

Thx

@jackyon
Copy link

jackyon commented Jan 21, 2014

hi phlegx, you can use jquery is().

example:
if(jQuery('.section-3').is(':in-viewport')){
$('.section-3').addClass('active');
} else {
$('.section-3').removeClass('active');
}

@funwhilelost
Copy link

Or simply use .not(':in-viewport')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants