I have this function for tooltips:
//Tooltips
(function($) {
$.fn.tooltips = function(html) {
var $tooltip,
$html;
return this.each(function(data, html) {
$html = $(html).attr("data-tooltip", data);
var $tooltip = $('<div class="tooltip" data-tooltip="' + data + '">' + $html.attr('title') + '</div>').appendTo(".tip");
$html.removeAttr("title").hover(function() {
$html = $(this);
$tooltip = $('div[data-tooltip=' + $html.data('tooltip') + ']');
$tooltip.addClass("active");
}, function() {
$html = $(this);
$tooltip = $('div[data-tooltip=' + $html.data('tooltip') + ']');
setTimeout(function() {
$tooltip.removeClass("active");
}, 100);
});
});
}
})(jQuery);
$(function() {
$("a.tip[title]").tooltips();
});
And I have a PHP loop with this:
echo '<span class="author-meta"><a class="author tip" id="'. $username .'" href="#" title="[Removed]">'. $username .'</a></span><br>';
Currently when you hover over one name, all the title tags appear on all the names. Is there an easy method to have it so if you hover over one name - Only that name has the hover event?
The code is from a free tutorial website that I can't seem to find anymore but I don't remember this particular issue being mentioned in the comment section so I'm at a loss!