我想在鼠标悬停或悬停上显示日期,现在它是onclick,我已经使用工具提示来显示数据,但我想在鼠标悬停上显示数据,我尝试了很多但没有成功?任何机构都可以提供帮助,敬请期待。如何更改点击鼠标悬停或通过jquery悬停?
这是我的代码,它想克隆到mouseiver/hover。
<script>
$(".ajax_link").click(function(e) {
e.preventDefault(); //Stops link from changing the page
var link = $(this).attr('href'); //Gets link url
$.ajax({ //Make the ajax request
url: link,
cache: false
}).done(function(html) { //On complete run tooltip code
//Display tooltip code goes here, returned text is variable html
.done(function(html) {
alert("text: " + html);
});
});
});
</script>
有没有理由不能只使用.mouseover()? – Bernie 2013-03-08 05:40:08
只是改变.click到.hover – dakait 2013-03-08 05:41:30
你有没有尝试过使用'mouseenter()''mouseleave()'? – sweetamylase 2013-03-08 05:45:44