Shi*_*dya 2 html javascript css jquery datepicker
我正在尝试在鼠标悬停时添加工具提示,工具提示应显示在鼠标指针的底部。当我将鼠标悬停在日期上但无法绑定工具提示时,它将发出警报。这是我的小提琴链接
Js代码
<script type="text/javascript">
$('#academic_calendar').datepicker({
minDate:0,
});
$(".ui-state-default").live("mouseenter", function() {
console.log("Hover");
});
</script>
Run Code Online (Sandbox Code Playgroud)
jQuery live已弃用。您需要使用.on或.bind处理程序。我用工具提示更新了小提琴。
<script type="text/javascript">
$('#academic_calendar').datepicker({
minDate:0,
});
$(".ui-state-default").on("mouseenter", function() {
$(this).attr('title', 'This is the hover-over text'); // title attribute will be shown during the hover
});
</script>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
12137 次 |
| 最近记录: |