【发布时间】:2016-09-20 19:10:38
【问题描述】:
当鼠标悬停在复选框的标签上时会显示一个工具提示,而不是悬停时会隐藏。
HTML:
<div style="margin: 2em 0 0 2em">
<label id="checkbox-label">
<input type="checkbox">Checkbox</label>
</div>
JS:
$('#checkbox-label').tooltip({
title: "This tooltip won't disappear when the checkbox is checked.",
placement: "right"
})
问题是当用户选中或取消选中复选框时,工具提示不会隐藏,直到用户单击屏幕上的其他位置。
当复选框被选中/取消选中时,如何让这个工具提示消失?
这是重现问题的 JS Fiddle:http://jsfiddle.net/eLax5hdq/5/
【问题讨论】:
标签: javascript jquery html twitter-bootstrap checkbox