forked from leozhang2018/bs_online
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbook_info.php
More file actions
45 lines (40 loc) · 1.75 KB
/
book_info.php
File metadata and controls
45 lines (40 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<!-- 书籍信息 -->
<?php include 'header.php';?>
<?php include 'nav_viewallbooks.php';?>
<a id="temp1" tabindex="0" class="btn btn-info" role="button" data-toggle="popover" title="详情" >详情</a>
</body>
<script>
$(function () {
$('[data-toggle="popover"]').each(function () {
var element = $(this);
var id = element.attr('id');
var txt = element.html();
element.popover({
trigger: 'manual',
placement: 'right', //top, bottom, left or right
title: txt,
html: 'true',
content: ContentMethod(txt),
}).on("mouseenter", function () {
var _this = this;
$(this).popover("show");
$(this).siblings(".popover").on("mouseleave", function () {
$(_this).popover('hide');
});
}).on("mouseleave", function () {
var _this = this;
setTimeout(function () {
if (!$(".popover:hover").length) {
$(_this).popover("hide")
}
}, 100);
});
});
});
function ContentMethod(txt) {
return '<table class="table table-bordered"><tr><td>' + txt + '</td><td>BB</td><td>CC</td><td>DD</td></tr>' +
'<tr><td>' + txt + '</td><td>BB</td><td>CC</td><td>DD</td></tr>' +
'<tr><td>' + txt + '</td><td>BB</td><td>CC</td><td>DD</td></tr>'+
'<tr><td><?php echo $summary ?></td><td>BB</td><td>CC</td><td>DD</td></tr></table>';
}
</script>