Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bootstrap-multiselect
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bootstrap-multiselect
Commits
877e4590
Commit
877e4590
authored
Feb 12, 2015
by
davidstutz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support filter with clickable opt groups.
parent
0da8ba8e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
1 deletion
+40
-1
bootstrap-multiselect.js
dist/js/bootstrap-multiselect.js
+2
-1
index.html
index.html
+38
-0
No files found.
dist/js/bootstrap-multiselect.js
View file @
877e4590
...
...
@@ -585,10 +585,11 @@
// Search all option in optgroup
var
$options
=
group
.
nextUntil
(
'
li.multiselect-group
'
);
var
$visibleOptions
=
$options
.
filter
(
"
:visible
"
);
// check or uncheck items
var
allChecked
=
true
;
var
optionInputs
=
$
o
ptions
.
find
(
'
input
'
);
var
optionInputs
=
$
visibleO
ptions
.
find
(
'
input
'
);
optionInputs
.
each
(
function
()
{
allChecked
=
allChecked
&&
$
(
this
).
prop
(
'
checked
'
);
});
...
...
index.html
View file @
877e4590
...
...
@@ -1711,6 +1711,44 @@
});
});
<
/script
>
</pre>
</div>
<p>
Clickable
<code>
optgroup
</code>
's are also supported:
</p>
<div
class=
"example"
>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
()
{
$
(
'
#example-enableFiltering-enableClickableOptGroups
'
).
multiselect
({
enableFiltering
:
true
,
enableClickableOptGroups
:
true
});
});
</script>
<select
id=
"example-enableFiltering-enableClickableOptGroups"
multiple=
"multiple"
>
<optgroup
label=
"Group 1"
>
<option
value=
"1-1"
>
Option 1.1
</option>
<option
value=
"1-2"
selected=
"selected"
>
Option 1.2
</option>
<option
value=
"1-3"
selected=
"selected"
>
Option 1.3
</option>
</optgroup>
<optgroup
label=
"Group 2"
>
<option
value=
"2-1"
>
Option 2.1
</option>
<option
value=
"2-2"
>
Option 2.2
</option>
<option
value=
"2-3"
>
Option 2.3
</option>
</optgroup>
</select>
</div>
<div
class=
"highlight"
>
<pre
class=
"prettyprint linenums"
>
<
script type=
"
text/javascript
">
$(document).ready(function() {
$('#example-example-enableFiltering-enableClickableOptgroups').multiselect({
enableFiltering: true,
enableClickableOptGroups: true
});
});
<
/script
>
</pre>
</div>
</td>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment