更新时间:2022-03-27 22:31:28
您可以使用 position
选项. jQuery UI Position选项包含许多其他选项,例如my
,at
等.一旦此选项为
You can achieve anything related to positioning of tooltip using the position
option in the jQuery UI Tooltip. The jQuery UI Position option contain many further options such as my
, at
etc. Once such option is within
. This can be used to limit the position of an element within another.
在这里,只需按如下所示初始化工具提示即可将工具提示位置包含在父元素中.
Here, the tooltips position can be contained within the parent element simply by initializing the tooltip as follows.
$( '#bodyInner' ).tooltip({
position:{ within: "#bodyInner"}
});
这是演示.