回答編集履歴
1
サンプル追記
test
CHANGED
@@ -29,3 +29,129 @@
|
|
29
29
|
</div>
|
30
30
|
|
31
31
|
```
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
---
|
36
|
+
|
37
|
+
一応、これで動くのを確認済みです。
|
38
|
+
|
39
|
+
```html
|
40
|
+
|
41
|
+
<!DOCTYPE html>
|
42
|
+
|
43
|
+
<html lang="ja">
|
44
|
+
|
45
|
+
<head>
|
46
|
+
|
47
|
+
<meta charset="UTF-8">
|
48
|
+
|
49
|
+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
|
50
|
+
|
51
|
+
<script src="https://code.jquery.com/jquery-3.1.0.min.js"></script>
|
52
|
+
|
53
|
+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
|
54
|
+
|
55
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
56
|
+
|
57
|
+
</head>
|
58
|
+
|
59
|
+
<body>
|
60
|
+
|
61
|
+
<div id="panel">
|
62
|
+
|
63
|
+
<a href="#qdate" class="list-group-item" data-toggle="collapse" data-target="#qdate" data-parent="#panel">
|
64
|
+
|
65
|
+
<span class="glyphicon glyphicon-user"></span> User1
|
66
|
+
|
67
|
+
<span class="glyphicon glyphicon-chevron-down pull-right"></span>
|
68
|
+
|
69
|
+
</a>
|
70
|
+
|
71
|
+
<div id="qdate" class="sublinks collapse">
|
72
|
+
|
73
|
+
<table>
|
74
|
+
|
75
|
+
<tr>
|
76
|
+
|
77
|
+
<th>test</th>
|
78
|
+
|
79
|
+
<th>test</th>
|
80
|
+
|
81
|
+
</tr>
|
82
|
+
|
83
|
+
<tr>
|
84
|
+
|
85
|
+
<td>test</td>
|
86
|
+
|
87
|
+
<td>test</td>
|
88
|
+
|
89
|
+
</tr>
|
90
|
+
|
91
|
+
</table>
|
92
|
+
|
93
|
+
</div><!-- end #qdate -->
|
94
|
+
|
95
|
+
</div><!-- end #panel -->
|
96
|
+
|
97
|
+
</body>
|
98
|
+
|
99
|
+
<script type="text/javascript">
|
100
|
+
|
101
|
+
jQuery.noConflict();
|
102
|
+
|
103
|
+
$q = jQuery;
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
(function($) {
|
108
|
+
|
109
|
+
'use strict';
|
110
|
+
|
111
|
+
$q('#qdate').on({
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
'show.bs.collapse': function() {
|
116
|
+
|
117
|
+
$q('a[href="#' + this.id + '"] span.glyphicon-chevron-down')
|
118
|
+
|
119
|
+
.removeClass('glyphicon-chevron-down')
|
120
|
+
|
121
|
+
.addClass('glyphicon-chevron-up');
|
122
|
+
|
123
|
+
},
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
'hide.bs.collapse': function() {
|
128
|
+
|
129
|
+
$q('a[href="#' + this.id + '"] span.glyphicon-chevron-up')
|
130
|
+
|
131
|
+
.removeClass('glyphicon-chevron-up')
|
132
|
+
|
133
|
+
.addClass('glyphicon-chevron-down');
|
134
|
+
|
135
|
+
}
|
136
|
+
|
137
|
+
});
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
$q('a[href="#qdate"]').on('click', function(event) {
|
142
|
+
|
143
|
+
event.preventDefault();
|
144
|
+
|
145
|
+
});
|
146
|
+
|
147
|
+
})(jQuery);
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
</script>
|
152
|
+
|
153
|
+
</html>
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
```
|