Я использую jQuery и Tooltipster (показывая всплывающие подсказки при переходе на имена пользователей), которые отлично работают, за исключением одной ситуации: когда я сначала нахожу имя пользователя, он не отображается.
<div class="user">Firstname Lastname</div>
Вот мой код jQuery:
$(document).ready(function() {
$(document).on('mouseover', '.user', function() {
// Tooltip for EC user
$('.evac_user').tooltipster({
animation : 'fade',
delay : 0,
content : 'Loading...',
functionBefore : function(origin, continueTooltip) {
continueTooltip();
// next, we want to check if our data has already been cached
if (origin.data('ajax') !== 'cached') {
$.ajax({
type : 'GET',
url : "/myfunction",
success : function(data) {
// update our tooltip content with our returned data and cache it
origin.tooltipster('update', data).data('ajax', 'cached');
}
});
}
}
});
});
});
$('.user').on('mouseover', function(){