回答編集履歴
1
サンプル追記
answer
CHANGED
@@ -13,4 +13,67 @@
|
|
13
13
|
</tr>
|
14
14
|
</table>
|
15
15
|
</div>
|
16
|
+
```
|
17
|
+
|
18
|
+
---
|
19
|
+
一応、これで動くのを確認済みです。
|
20
|
+
```html
|
21
|
+
<!DOCTYPE html>
|
22
|
+
<html lang="ja">
|
23
|
+
<head>
|
24
|
+
<meta charset="UTF-8">
|
25
|
+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
|
26
|
+
<script src="https://code.jquery.com/jquery-3.1.0.min.js"></script>
|
27
|
+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
|
28
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="panel">
|
32
|
+
<a href="#qdate" class="list-group-item" data-toggle="collapse" data-target="#qdate" data-parent="#panel">
|
33
|
+
<span class="glyphicon glyphicon-user"></span> User1
|
34
|
+
<span class="glyphicon glyphicon-chevron-down pull-right"></span>
|
35
|
+
</a>
|
36
|
+
<div id="qdate" class="sublinks collapse">
|
37
|
+
<table>
|
38
|
+
<tr>
|
39
|
+
<th>test</th>
|
40
|
+
<th>test</th>
|
41
|
+
</tr>
|
42
|
+
<tr>
|
43
|
+
<td>test</td>
|
44
|
+
<td>test</td>
|
45
|
+
</tr>
|
46
|
+
</table>
|
47
|
+
</div><!-- end #qdate -->
|
48
|
+
</div><!-- end #panel -->
|
49
|
+
</body>
|
50
|
+
<script type="text/javascript">
|
51
|
+
jQuery.noConflict();
|
52
|
+
$q = jQuery;
|
53
|
+
|
54
|
+
(function($) {
|
55
|
+
'use strict';
|
56
|
+
$q('#qdate').on({
|
57
|
+
|
58
|
+
'show.bs.collapse': function() {
|
59
|
+
$q('a[href="#' + this.id + '"] span.glyphicon-chevron-down')
|
60
|
+
.removeClass('glyphicon-chevron-down')
|
61
|
+
.addClass('glyphicon-chevron-up');
|
62
|
+
},
|
63
|
+
|
64
|
+
'hide.bs.collapse': function() {
|
65
|
+
$q('a[href="#' + this.id + '"] span.glyphicon-chevron-up')
|
66
|
+
.removeClass('glyphicon-chevron-up')
|
67
|
+
.addClass('glyphicon-chevron-down');
|
68
|
+
}
|
69
|
+
});
|
70
|
+
|
71
|
+
$q('a[href="#qdate"]').on('click', function(event) {
|
72
|
+
event.preventDefault();
|
73
|
+
});
|
74
|
+
})(jQuery);
|
75
|
+
|
76
|
+
</script>
|
77
|
+
</html>
|
78
|
+
|
16
79
|
```
|