var $elem = jQuery('#myElem');
jQuery(window).scrollTop() > $elem.offset().top
checks if the element has been scrolled up.
($elem.offset().top + $elem.height()) > jQuery(window).height()
checks if the element is below the current view port.
If any of the conditions is true, the element is currently not visible completely.
You can bring it in view using
jQuery('html,body').animate({scrollTop: $elem.offset().top}, 500);
something regarding programming and installations...
Human knowledge belongs to the world!
Subscribe to:
Comments (Atom)
Why Your New External Drive is Breaking Your macOS Builds
Picture this: you're running dangerously low on disk space, so you invest in a brand new external drive. Time to migrate your developmen...
-
VMware Fusion provides a nice functionality of sharing folder from host (Mac OSX) to guest (Ubuntu). But then, it seems they are more focus...
-
I frequently encounter architectural decisions that seem counterintuitive from an operational perspective. Recently, while containerizin...
-
Recently, while investigating a production issue, I needed to deploy the production Docker image locally for debugging purposes. However, I ...