Simple Tooltip on title tag
Simple tool tip with x and y coordinates on mouse.
// Tooltip only Text $('.basetooltip').hover(function () { // Hover over code var title = $(this).attr('title'); $(this).data('tipText', title).removeAttr('title'); $('') .text(title) .appendTo('body') .fadeIn('slow'); }, function () { // Hover out code $(this).attr('title', $(this).data('tipText')); $('.tooltip').remove(); }).mousemove(function (e) { var mousex = e.pageX + 20; //Get X coordinates var mousey = e.pageY + 10; //Get Y coordinates $('.tooltip') .css({ top: mousey, left: mousex }) });DEMO
Simple Tooltip on title tag
Reviewed by Bhaumik Patel
on
11:29 PM
Rating: