How to display the data from database through tooltip? How to display the data from database through tooltip? ajax ajax

How to display the data from database through tooltip?


Hope this will help you..

$(".ajax_links").hover(function(e) {    e.preventDefault();     var link = $(this).attr('href');    $.ajax({         type: "GET",           url: link,        success : function (data){        $('#elementId').attr('title',data);        }     });});


If the issue is only with jquery syntax, you can try this:

   $(this).attr("title", html);


Instead of modal window. you just have a container for div with id tooltip. like this. then append the results. some thing like this : demo tooltip. and CSS taken from this answer Pure CSS Tooltip

$('#toolTip').show();

Working demo : DEMO for Tooltip

or you can append to title attribute.

 $('#elementId').attr('title',data);