我有一个输入,当用户第一次加载表单时,它会填充一个值。我想让这个工具提示一直存在,直到用户专注于这一领域。我在整个页面上使用相同的工具提示,并且只需要在页面加载时显示这 1 个工具提示,直到用户专注于其下方的输入。然后它可以消失或表现得像其他人一样。有没有办法做到这一点?
HTML:
<label for="vehiclePrice" class="form-control-label vpl">Vehicle Price <a href="#" title="Customize your vehicle price." class="jqTooltip">tooltip<img src="assets/img/glyphicons3/comment.png" width="10" height="10" /></a></label>
<input type="text" class="form-control" name="vehiclePrice" id="vehiclePrice" placeholder="$25592 Suggested MSRP" onkeypress="return isNumberKey(event)" value="25592 Suggested MSRP" required />
JS:
$(function() {
$(".jqTooltip").tooltip({
track: true,
position: {
my: "center bottom-20",
at: "center top",
using: function( position, feedback ) {
$( this ).css( position );
$( "<div>" )
.addClass( "arrow" )
.addClass( feedback.vertical )
.addClass( feedback.horizontal )
.appendTo( this );
}
}
});
});
您还可以在小提琴中看到一些漂亮的 CSS: