大家好我使用的hover
和click
功能的工具提示从这里如何使用悬停,然后单击使用jQuery
现在按我的要求,我想这两个hover
和click
结合事件在一个方法中。当hover
我不想显示close
按钮,但当用户点击我想显示close
按钮。我怎么能在一个事件这样做可以在任何帮助我或者任何实例或样品,请分享
我对Click
<script type="text/javascript">
$(document).ready(function() {
$('#foobar2').click(function() {
var url = $(this).attr('href');
$(this).formBubble({
url: url,
dataType: 'html',
cache: false
});
return false;
});
});
</script>
尝试本作Tooltip
我厌倦了这一点,但没有工作,你可以编辑请
<script type="text/javascript">
$(document).ready(function() {
$('#foobar2').bind('mouseover click',function(e) {
if(e.Type=='click')
{
var url = $(this).attr('href');
$(this).formBubble({
url: url,
dataType: 'html',
cache: false
});
return false;
}
if(e.Type=='mouseover')
{
var url = $(this).attr('href');
$(this).formBubble({
closebutton:false;
url: url,
dataType: 'html',
cache: false
});
$.fn.formBubble.text('hover hover hover hover');
}, function() { //mouse out
var thisBubble = $.fn.formBubble.bubbleObject;
$.fn.formBubble.close(thisBubble);
});
}
});});
</script>
您好我试过,但没有奏效
if(e.type=='mouseout')
{
var url = $(this).attr('href');
$(this).formBubble.hide()
}
发布您的代码... –