好吧..有点复杂的问题。当您将鼠标悬停在 TR 上时,我会出现一个 DIV。
$(".alignment_tr").hover( function() {
console.log( "alignmententer" + triggerMouseover );
var tid = $(this).find( ".hidden_inp_selected_alignment" ).val();
var element = $(this);
if( ! element.hasClass( "mouseover-tooltip" ) )
{
$.ajax( {
url: Drupal.settings.jstools.basePath + "?q=search/mouseover_info",
dataType: 'json',
data: { "tid": tid },
success: function( response ) {
$(".mouseover-tooltip .top-level").html( response.genre );
$(".mouseover-tooltip .second-level").html( response.name );
$(".mouseover-tooltip .description").html( response.description );
$(".mouseover-tooltip").css( {
left: element.position().left + ( element.width() * 0.75 ),
top: element.position().top - element.height() / 2,
} );
if( $(".mouseover-tooltip").css( "display" ) == "none" )
{
$(".mouseover-tooltip").fadeIn();
}
}
});
}
},
function() {
console.log( "alignmentleave" + triggerMouseover );
setTimeout( fadeMouseover, 5000 );
}
);
我试图得到它,以便当您将鼠标悬停在 DIV 上时,它不会消失。有小费吗?
澄清 现在,当您将鼠标悬停在 TD 上时,会出现 DIV。我对其进行了操纵,以便当您将鼠标悬停在 DIV 上时,它会保持不变(曾经消失)。但是现在,当您的鼠标离开 TR 并离开 DIV 时,DIV 不会消失。