position Interaction — Positions other controls relative to the specified target control. Utility script for positioning any widget relative to the window, document, a particular element, or the cursor/mouse. Note: Position does not support positioning hidden elements.
Examples Default functionality <div class="slice"> <asp:TextBox runat="server" /> <asp:Label runat="server">Non-Positioned Label</asp:Label> </div> <div class="slice"> <asp:TextBox runat="server" ID="_TextBox" /> <asp:Label runat="server" id="_Label">Positioned Label</asp:Label> <Juice:Position runat="server" TargetControlID="_Label" my="left" at="right" of="_TextBox" offset="20 0" /> </div> <div class="slice"> <asp:TextBox runat="server" ID="_Textbox2" /> <asp:Label runat="server" id="_Label2">Static Label, Positioned Textbox</asp:Label> <Juice:Position runat="server" TargetControlID="_TextBox2" my="top" at="bottom" of="_Label2" offset="20 0" /> </div> Non-Positioned Label Positioned Label Static Label, Positioned Textbox
Properties My Type: String Default: null Defines which position on the element being positioned to align with the target element: "horizontal vertical" alignment. A single value such as "right" will default to "right center", "top" will default to "center top" (following CSS convention). Acceptable values: "top", "center", "bottom", "left", "right". Example: "left top" or "center center" jQuery UI Reference → #option-my At Type: String Default: null Defines which position on the target element to align the positioned element against: "horizontal vertical" alignment. A single value such as "right" will default to "right center", "top" will default to "center top" (following CSS convention). Acceptable values: "top", "center", "bottom", "left", "right". Example: "left top" or "center center" jQuery UI Reference → #option-at Of Type: String Default: null Element to position against. If you provide a selector, the first matching element will be used. If you provide a jQuery object, the first element will be used. If you provide an event object, the pageX and pageY properties will be used. Example: "#top-menu" jQuery UI Reference → #option-of Collision Type: String Default: null When the positioned element overflows the window in some direction, move it to an alternative position. Similar to my and at, this accepts a single value or a pair for horizontal/vertical, eg. "flip", "fit", "fit flip", "fit none". jQuery UI Reference → #option-collision Using Type: String Default: null When specified the actual property setting is delegated to this callback. Receives a single parameter which is a hash of top and left values for the position that should be set. jQuery UI Reference → #option-using
Events All events are currently of the type EventHandler. The "sender" parameter is a reference to the control, and should be cast appropriately to access the widget's properties and methods. This Control has no server-side events. For client-side (Javascript) events, please see the jQuery UI Reference page for this Control.