在我想调用第一次单击事件的函数下方,当用户单击时,该函数将在鼠标悬停时调用,这可能吗?
<a href="javascript:void(0);" id="digit<?php echo $k;?>" onClick="javascript:return swapClass('<?php echo strtoupper($v);?>','<?php echo $k;?>');" class="GetDivCount" rel="<?php echo $k;?>" onMouseMove="javascript:return swapClass('<?php echo strtoupper($v);?>','<?php echo $k;?>');">
-
function swapClass(getId,keyId) {
<!-- INACTIVE ACTIVE CLASS IF SELECT ALL BUTTONS -->
if(jQuery('.digit_active').length==15)
{
var p=0;
jQuery('.digit_active').each(function(){
var CurrentActive=$(this);
var activeValue = CurrentActive.attr('rel');
jQuery('#digit'+activeValue).removeClass('digit_active');
p++;
});
arrString.length=0;
jQuery("#middleReload").load(location.href + " #middleReload>*","");
}
<!-- INACTIVE ACTIVE CLASS IF SELECT ALL BUTTONS -->
jQuery('#digit'+keyId).addClass('digit_active');
/*
|-------------------------------|
| GROUP A FOR RED POINTS |
| |
|-------------------------------|
*/
if($('#colorDiv'+keyId).hasClass('red_Q')){
// FOR GET LETTER HERE
var BonusRed=getId;
}
arrString.push(getId);
var wordFind;
jQuery.ajax({
url:'ajax.php?action=wordFind&word='+arrString,
cache:false,
async:false,
type:"GET",
success:function(res){
console.log(res);//To check you are getting any reponse
if(res=="find")
{
<!--BUTTON SOUND -->
playAudio();
<!--BUTTON SOUND -->
jQuery("#wordReload").load(location.href + " #wordReload>*","");
arrString.length=0;
document.getElementById('bonusDiv'+keyId).style.display='block';
jQuery('#bonusDiv'+keyId).animate({
bottom: 200, opacity: 1
}, 300 );
jQuery('#bonusDiv'+keyId).fadeOut('slow');
<!--REMOVE SELECTED ACTIVE CLASS START -->
jQuery('#digit'+keyId).removeClass('digit_active');
var m=0;
var active=new Array();
jQuery('.digit_active').each(function(){
var CurrentActive=jQuery(this);
var activeValue = CurrentActive.attr('rel');
jQuery('#digit'+activeValue).removeClass('digit_active');
m++;
});
<!--REMOVE SELECTED ACTIVE CLASS END -->
}
}
});
}