How to give tooltip to element of table while hover the element.
<th id="metricsHead">Grade_Desc</th>
While hovering the element the tooltip should be "Grade Description"
How to give tooltip to element of table while hover the element.
<th id="metricsHead">Grade_Desc</th>
While hovering the element the tooltip should be "Grade Description"
Share Improve this question asked Aug 25, 2016 at 6:06 NimmiNimmi 6909 silver badges19 bronze badges3 Answers
Reset to default 2Just set the title
attribute
<table>
<th id="metricsHead" title="Grade Description">Grade_Desc</th>
</table>
if you want to set it dynamically
$('#metricsHead').attr('title', "Grade Description")
<script src="https://ajax.googleapis./ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<table>
<th id="metricsHead" >Grade_Desc</th>
</table>
document.getElementById('metricsHead').title = 'your new title';
other option from jquery is
$('#metricsHead').prop('title', 'your new title');
You can set the title
attribute with jQuery.
$("#metricsHead").attr("title", "Grade Description");
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744711582a4589374.html
评论列表(0条)