This is an awesome little plugin to detect if an element is outside the viewport. This example uses it to prevent a dropdown menu from hanging off the right side of the viewport.

Source: jQuery.isOnScreen


3,711 0 7