Dojo's TriggerPopup
widget allows popup content to be shown relative to a trigger widget.
The popup can be positioned above
or below
the trigger, and handles adjusting its position to make sure it is fully visible.
A body
tag is used to render the popup as well as an underlay to ensure that the page cannot be interacted with whilst the popup is visible. The popup is designed to be used with toggle buttons / selects / menus.