jquery_viewport icon indicating copy to clipboard operation
jquery_viewport copied to clipboard

How to implement :not-in-viewport?

Open phlegx opened this issue 11 years ago • 2 comments

Hi all!

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

Thx

phlegx avatar Mar 12 '13 10:03 phlegx

hi phlegx, you can use jquery is().

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

jackyon avatar Jan 21 '14 03:01 jackyon

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

funwhilelost avatar May 05 '16 22:05 funwhilelost