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
c8351a6f
Commit
c8351a6f
authored
Apr 11, 2015
by
davidstutz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#507: disabled options and clickable optgroups.
parent
47110d7e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
2 deletions
+39
-2
bootstrap-multiselect.js
dist/js/bootstrap-multiselect.js
+1
-1
index.html
index.html
+38
-1
No files found.
dist/js/bootstrap-multiselect.js
View file @
c8351a6f
...
...
@@ -633,7 +633,7 @@
// Search all option in optgroup
var
$options
=
group
.
nextUntil
(
'
li.multiselect-group
'
);
var
$visibleOptions
=
$options
.
filter
(
"
:visible
"
);
var
$visibleOptions
=
$options
.
filter
(
"
:visible
:not(.disabled)
"
);
// check or uncheck items
var
allChecked
=
true
;
...
...
index.html
View file @
c8351a6f
...
...
@@ -147,7 +147,7 @@
</div>
</li>
</ol>
<div
class=
"page-header"
>
<h2
id=
"configuration-options"
>
Configuration Options
</h2>
</div>
...
...
@@ -414,6 +414,43 @@
<
/script
>
</pre>
</div>
<p>
Note that this option does also work with disabled options:
</p>
<div
class=
"example"
>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
()
{
$
(
'
#example-enableClickableOptGroups-disabled
'
).
multiselect
({
enableClickableOptGroups
:
true
,
includeSelectAllOption
:
true
});
});
</script>
<select
id=
"example-enableClickableOptGroups-disabled"
multiple=
"multiple"
>
<optgroup
label=
"Group 1"
>
<option
value=
"1-1"
disabled
>
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"
disabled
>
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-enableClickableOptGroups-disabled').multiselect({
enableClickableOptGroups: true
});
});
<
/script
>
</pre>
</td>
</tr>
<tr>
...
...
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