增加tooltip功能

This commit is contained in:
hyzboy 2016-09-08 22:26:34 +04:00
parent ac2bd83a82
commit 456a8d4c40
2 changed files with 9 additions and 0 deletions

4
js/tooltip.js Normal file
View File

@ -0,0 +1,4 @@
$(document).ready(function()
{
$('[data-toggle="tooltip"]').tooltip();
});

View File

@ -79,6 +79,11 @@
echo '<span class="glyphicon glyphicon-'.$glyph.'"></span>';
}
function echo_span_hint_link($glyph,$text,$hint,$link)
{
echo '<a href="'.$link.'" data-toggle="tooltip" data-placement="top" title="'.$hint.'">'.'<span class="glyphicon glyphicon-'.$glyph.'"></span>'.$text.'</a>';
}
function echo_span_label($style,$text)
{
echo '<span class="label label-'.$style.'">'.$text.'</span>';