如何禁用链接,当点击这个代码时,我为图像淡出使用hoverintent。我现在使用的是一个已命名的锚,但它跳转,所以我想禁用点击。禁用点击#与hoverintent的链接
<A class="next2 nextbuttonB" href="#top">INSTALL</A>
<A class="next2 nextbuttonA" href="#top">ESTIMATE</A>
和jQuery的
$('#A,#B,').addClass('nextHide');
$('.nextbuttonA').hoverIntent(function() {
$('#A').fadeIn("slow");$('#B').fadeOut();
}, function() {
$('#B').hide();
});
$('.nextbuttonB').hoverIntent(function() {
$('#B').fadeIn("slow");$('#A').fadeOut();
}, function() {
$('#A').hide();
});
$('.nextbutton').hoverIntent(function() {
$('#A,#B').fadeOut();
}, function() {
$('#A,#B').hide();
});
$('#A,#B').mouseleave(function(){
$('#A,#B').fadeOut();
});
'event.preventDefault()'或'返回FALSE'将解决这个问题。 – undefined