jQuery EasyUI steker berdasarkan - balon Tooltip
jQuery EasyUI Plugin
Dengan $ .fn.tooltip.defaults menimpa default default.
Ketika pengguna menggerakkan pointer mouse elemen, diminta jendela digunakan untuk menampilkan informasi tambahan. Tips dapat berisi konten atau html elemen dari halaman yang dihasilkan oleh ajax.
pemakaian
Membuat kotak prompt (Tooltip)
1, dari tag untuk membuat balon (Tooltip), menambahkan kelas 'easyui-tooltip' ke elemen, tidak memerlukan kode javascript.
title="This <a href="#" adalah tooltip message." class="easyui-tooltip"> Hover saya </a>
2, menggunakan javascript untuk membuat balon (Tooltip).
<a id="dd" href="javascript:void(0)"> Klik di sini </a>
$ ( '# Dd'). Tooltip ({ Posisi: 'benar', konten: '<span style = "color: # fff"> ini adalah pesan tooltip </ span>.', OnShow: function () { $ (Ini) .tooltip ( 'tip'). Css ({ backgroundColor: '# 666', Bordercolor: '# 666' }); } });
milik
名称 | 类型 | 描述 | 默认值 |
---|---|---|---|
position | string | 提示框(tooltip)位置。可能的值:'left'、'right'、'top'、'bottom'。 | bottom |
content | string | 提示框(tooltip)内容。 | null |
trackMouse | boolean | 如果设置为 true,提示框(tooltip)会随着鼠标移动。 | false |
deltaX | number | 提示框(tooltip)位置的水平距离。 | 0 |
deltaY | number | 提示框(tooltip)位置的垂直距离。 | 0 |
showEvent | string | 引发提示框(tooltip)出现的事件。 | mouseenter |
hideEvent | string | 引发提示框(tooltip)消失的事件。 | mouseleave |
showDelay | number | 显示提示框(tooltip)的时间延迟。 | 200 |
hideDelay | number | 隐藏提示框(tooltip)的时间延迟。 | 100 |
peristiwa
名称 | 参数 | 描述 |
---|---|---|
onShow | e | 当显示提示框(tooltip)时触发。 |
onHide | e | 当隐藏提示框(tooltip)时触发。 |
onUpdate | content | 当提示框(tooltip)内容更新时触发。 |
onPosition | left,top | 当提示框(tooltip)位置改变时触发。 |
onDestroy | none | 当提示框(tooltip)销毁时触发。 |
cara
名称 | 参数 | 描述 |
---|---|---|
options | none | 返回选项(options)属性(property)。 |
tip | none | 返回提示(tip)对象。 |
arrow | none | 返回箭头(arrow)对象。 |
show | e | 显示提示框(tooltip)。 |
hide | e | 隐藏提示框(tooltip)。 |
update | content | 更新提示框(tooltip)内容。 |
reposition | none | 重置提示框(tooltip)位置。 |
destroy | none | 销毁提示框(tooltip)。 |
jQuery EasyUI Plugin