How to display the data from database through tooltip?
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);