jqui_position {shinyjqui} | R Documentation |
Position an element relative to another
Description
Wrapper of the jQuery UI .position() method, allows you to position an element relative to the window, document, another element, or the cursor/mouse, without worrying about offset parents.
Usage
jqui_position(
ui,
my = "center",
at = "center",
of,
collision = "flip",
within = JS("$(window)")
)
Arguments
ui |
Which element to be positioned. Can be a string of jQuery_selector or a JS() wrapped javascript expression that returns a jQuery object. Only the first matching element will be used. |
my |
String. Defines which position on the element being positioned to align with the target element: "horizontal vertical" alignment. A single value such as "right" will be normalized to "right center", "top" will be normalized to "center top" (following CSS convention). Acceptable horizontal values: "left", "center", "right". Acceptable vertical values: "top", "center", "bottom". Example: "left top" or "center center". Each dimension can also contain offsets, in pixels or percent, e.g., "right+10 top-25%". Percentage offsets are relative to the element being positioned. |
at |
String. Defines which position on the target element to align
the positioned element against: "horizontal vertical" alignment. See the
|
of |
Which element to position against. Can be a string of jQuery_selector or a JS() wrapped javascript expression that returns a jQuery object. Only the first matching element will be used. |
collision |
String. When the positioned element overflows the window in
some direction, move it to an alternative position. Similar to
|
within |
Element to position within, affecting collision detection. Can be a string of jQuery_selector or a JS() wrapped javascript expression that returns a jQuery object. Only the first matching element will be used. |