質問編集履歴
2
ソースの追加
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
jQuaryプラグインのQuicksearchで
|
1
|
+
jQuaryプラグインのQuicksearchで表示/非表示になっているリストからも検索できるようにしたい
|
test
CHANGED
@@ -1,11 +1,203 @@
|
|
1
|
-
jQuaryプラグインのQuicksearchで
|
1
|
+
下記のようにjQuaryプラグインのQuicksearchとタブ切替用のソースがあり、現状ではタブ切替してしまうと、非表示になっているリストからは検索がされない状態になっています。
|
2
|
+
|
3
|
+
|
4
|
+
|
2
|
-
|
5
|
+
■HTMLソース=======================================================================
|
6
|
+
|
7
|
+
|
8
|
+
|
3
|
-
|
9
|
+
<!-- 検索フォーム -->
|
10
|
+
|
4
|
-
|
11
|
+
<form id="quicksearch"><input type="text" name="search" value="" id="id_search" /></form>
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
<!-- タブ切替 -->
|
16
|
+
|
5
|
-
|
17
|
+
<ul id="filter">
|
18
|
+
|
6
|
-
|
19
|
+
<li><a href="javascript:void(0);" class="filter01">フィルター1</a></li>
|
20
|
+
|
21
|
+
<li><a href="javascript:void(0);" class="filter02">フィルター2</a></li>
|
22
|
+
|
23
|
+
<li><a href="javascript:void(0);" class="filter03">フィルター3</a></li>
|
24
|
+
|
25
|
+
</ul>
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
<!-- リスト -->
|
30
|
+
|
31
|
+
<ul id="filterlist">
|
32
|
+
|
7
|
-
|
33
|
+
<li class="filter01">テスト1</li>
|
34
|
+
|
8
|
-
|
35
|
+
<li class="filter02">テスト2</li>
|
36
|
+
|
37
|
+
<li class="filter03">テスト3</li>
|
38
|
+
|
39
|
+
<li class="filter01">テスト11</li>
|
40
|
+
|
41
|
+
</ul>
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
■JavaScript=========================================================================
|
46
|
+
|
47
|
+
// filterlist タブ切替
|
48
|
+
|
49
|
+
// filterlist
|
50
|
+
|
51
|
+
$(function() {
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
var $setFilter = $('#filter li'),
|
56
|
+
|
57
|
+
$setList = $('#filterlist'),
|
58
|
+
|
59
|
+
$setFilterAll = $('.allitem');
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
var showFade = 1000,
|
64
|
+
|
65
|
+
showShut = 1000,
|
66
|
+
|
67
|
+
hideFade = 0,
|
68
|
+
|
69
|
+
hideShut = 0;
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
var $setFilterBtn = $setFilter.children('a'),
|
74
|
+
|
75
|
+
$setFilterList = $setList.children('li'),
|
76
|
+
|
77
|
+
$filterAllItem = $setFilterAll.attr('class');
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
if ($(window).width() > 641) {
|
82
|
+
|
83
|
+
$setFilterBtn.click(function(){
|
84
|
+
|
85
|
+
if(!($(this).hasClass('active'))){
|
86
|
+
|
87
|
+
var filterClass = $(this).attr('class');
|
88
|
+
|
89
|
+
$setFilterList.each(function(){
|
90
|
+
|
91
|
+
if($(this).hasClass(filterClass)){
|
92
|
+
|
93
|
+
$(this).css({display:'block'});
|
94
|
+
|
9
|
-
|
95
|
+
$(this).find('*').stop().animate({opacity:'1'},showFade);
|
96
|
+
|
10
|
-
|
97
|
+
$(this).stop().animate({width:'140px'},showShut);
|
98
|
+
|
99
|
+
} else {
|
100
|
+
|
101
|
+
$(this).find('*').stop().animate({opacity:'0'},hideFade);
|
102
|
+
|
103
|
+
$(this).stop().animate({width:'140px'},hideShut,function(){
|
104
|
+
|
105
|
+
$(this).css({display:'none'});
|
106
|
+
|
107
|
+
});
|
108
|
+
|
109
|
+
}
|
110
|
+
|
111
|
+
});
|
112
|
+
|
113
|
+
$setFilterBtn.removeClass('active');
|
114
|
+
|
115
|
+
$(this).addClass('active');
|
116
|
+
|
117
|
+
}
|
118
|
+
|
119
|
+
});
|
120
|
+
|
121
|
+
$setFilterAll.click(function(){
|
122
|
+
|
123
|
+
$setFilterList.each(function(){
|
124
|
+
|
125
|
+
$(this).css({display:'block'});
|
126
|
+
|
127
|
+
$(this).find('*').stop().animate({opacity:'1'},showFade);
|
128
|
+
|
129
|
+
$(this).stop().animate({width:'140px'},showShut);
|
130
|
+
|
131
|
+
});
|
132
|
+
|
133
|
+
});
|
134
|
+
|
135
|
+
$setFilterAll.click();
|
136
|
+
|
137
|
+
}
|
138
|
+
|
139
|
+
else if ($(window).width() < 640) {
|
140
|
+
|
141
|
+
$setFilterBtn.click(function(){
|
142
|
+
|
143
|
+
if(!($(this).hasClass('active'))){
|
144
|
+
|
145
|
+
var filterClass = $(this).attr('class');
|
146
|
+
|
147
|
+
$setFilterList.each(function(){
|
148
|
+
|
149
|
+
if($(this).hasClass(filterClass)){
|
150
|
+
|
151
|
+
$(this).css({display:'block'});
|
152
|
+
|
153
|
+
$(this).find('*').stop().animate({opacity:'1'},showFade);
|
154
|
+
|
155
|
+
$(this).stop().animate({width:'50%'},showShut);
|
156
|
+
|
157
|
+
} else {
|
158
|
+
|
159
|
+
$(this).find('*').stop().animate({opacity:'0'},hideFade);
|
160
|
+
|
161
|
+
$(this).stop().animate({width:'50%'},hideShut,function(){
|
162
|
+
|
163
|
+
$(this).css({display:'none'});
|
164
|
+
|
165
|
+
});
|
166
|
+
|
167
|
+
}
|
168
|
+
|
169
|
+
});
|
170
|
+
|
171
|
+
$setFilterBtn.removeClass('active');
|
172
|
+
|
173
|
+
$(this).addClass('active');
|
174
|
+
|
175
|
+
}
|
176
|
+
|
177
|
+
});
|
178
|
+
|
179
|
+
$setFilterAll.click(function(){
|
180
|
+
|
181
|
+
$setFilterList.each(function(){
|
182
|
+
|
183
|
+
$(this).css({display:'block'});
|
184
|
+
|
185
|
+
$(this).find('*').stop().animate({opacity:'1'},showFade);
|
186
|
+
|
187
|
+
$(this).stop().animate({width:'50%'},showShut);
|
188
|
+
|
189
|
+
});
|
190
|
+
|
191
|
+
});
|
192
|
+
|
193
|
+
$setFilterAll.click();
|
194
|
+
|
195
|
+
}
|
196
|
+
|
197
|
+
})
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
ちなみに今回のページのHTMLではclassの.allitemは使用していません。
|
202
|
+
|
11
|
-
いい方法ありますでしょうか
|
203
|
+
いい方法ありますでしょうか。よろしくお願いいたします。
|
1
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
jQuaryのQuicksearchで最初にすべてのリストを表示したい
|
1
|
+
jQuaryプラグインのQuicksearchで最初にすべてのリストを表示したい
|
test
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
jQuaryのQuicksearchで検索フォーム(input)をクリックしたときに、リストをすべて表示させたいです。
|
1
|
+
jQuaryプラグインのQuicksearchで検索フォーム(input)をクリックしたときに、リストをすべて表示させたいです。
|
2
2
|
|
3
3
|
|
4
4
|
|