如何在将鼠标悬停在图标上时显示指针
下面我有一个 Jquery datepicker 和一个 jquery timepicker (都是 trent richardson 的 datepicker 和 timepicker)
$(function() {
$( "#datepicker" ).datepicker({minDate: 0,
dateFormat: "dd-mm-yy",
showOn: "button",
buttonImage: "Images/calendar.gif",
buttonImageOnly: true});
});
$('#durationpicker').trenttimepicker({
timeFormat:'hh mm ss',
hourGrid: 4,
minuteGrid: 10,
secondGrid: 10,
showOn: 'button',
buttonImage: "Images/clock.gif",
buttonImageOnly: true
});
});
现在,用户单击一个图标即可访问 datepicker 和 timepicker(datepicker 的日历图标和 timepicker 的时钟图标('#durationpicker')我的问题是,当用户将鼠标悬停在两个图标上时,如何才能显示指针光标?
下面是 html:
<p><strong>3: Duration:</strong> <input type="text" id="durationpicker" name="durationChosen" readonly="readonly" />
<p><strong>4: Date:</strong> <input type="text" id="datepicker" name="dateChosen" readonly="readonly" />
Below I have a Jquery datepicker and a jquery timepicker (both trent richardson's datepicker and timepicker)
$(function() {
$( "#datepicker" ).datepicker({minDate: 0,
dateFormat: "dd-mm-yy",
showOn: "button",
buttonImage: "Images/calendar.gif",
buttonImageOnly: true});
});
$('#durationpicker').trenttimepicker({
timeFormat:'hh mm ss',
hourGrid: 4,
minuteGrid: 10,
secondGrid: 10,
showOn: 'button',
buttonImage: "Images/clock.gif",
buttonImageOnly: true
});
});
Now both datepicker and timepicker are accessed by the user clicking on an icon (a calender icon for datepicker and a clock icon for timepicker ('#durationpicker'). What my question is that how can I get it so that the pointer cursor appears when the user is hovering over the two icons?
Below is the html:
<p><strong>3: Duration:</strong> <input type="text" id="durationpicker" name="durationChosen" readonly="readonly" />
<p><strong>4: Date:</strong> <input type="text" id="datepicker" name="dateChosen" readonly="readonly" />
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
这对我来说是 jQuery 的方式,你可以将它包含在你的脚本中,它不会给你带来任何问题。我自己将它用于一个包含 jQuery ThemeSwitcher 和 jQuery UI 主题的项目。
这是一个疯狂的猜测,但应该带你去你需要的地方:)
This works for me the jQuery way, you can include it in your script and it should not give you any issues. I'm using it myself for a project with both jQuery ThemeSwitcher and jQuery UI Themes.
This is a wild guess, but should take you where you need to :)
如果我理解你的问题,你需要为两个图标添加以下 CSS 代码
If I understand your question you need add the following CSS code for both icons
为我工作
Work for me