我已经实施了一个工具提示来显示数据。该脚本似乎工作正常,但数据没有显示。当我将鼠标悬停在但我想显示自定义数据时它会显示警告消息 请指点
Javascript for tooltip:
$('.tt_sub').hover(function () {
alert("HELLO");
$('.tt_sub').tooltip({title: function () {
return $(this).attr('name');
}
});
});
php CODE
<tbody>
<?php
$weekday = ["", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
for ($i = 1; $i < 7; $i++) {
?><tr><td><?php echo $weekday[$i] ?></td>
<?php
for ($j = 1; $j <= sizeof($slot_id); $j++) {
?>
<td>
<div class="form-row" >
<div class="form-group col-md-3">
<input class="cb_tt" id="<?php echo $slot_id[$j] ?>" name="<?php echo $i ?>" type="checkbox"/>
</div>
<div class="form-group col-md-3 tt_sub" id="<?php echo $slot_id[$j].$i ?>">
</div>
<div style="display: none;" class="tt_tea" id="<?php echo $slot_id[$j].$i ?>">
</div>
</div>
</td>
<?php
}
?></tr><?php
}
?>
</tbody>
答案 0 :(得分:0)
e.target