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
ccf0758b
Commit
ccf0758b
authored
Oct 14, 2015
by
David Stutz
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #604 from piotrromanowski/master
Added the ability to add class to customize class of li.
parents
8ec7d721
017cd9b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
bootstrap-multiselect.js
dist/js/bootstrap-multiselect.js
+12
-0
No files found.
dist/js/bootstrap-multiselect.js
View file @
ccf0758b
...
...
@@ -252,6 +252,15 @@
optionLabel
:
function
(
element
){
return
$
(
element
).
attr
(
'
label
'
)
||
$
(
element
).
text
();
},
/**
* Create a class.
*
* @param {jQuery} element
* @returns {String}
*/
optionClass
:
function
(
element
)
{
return
$
(
element
).
attr
(
'
class
'
)
||
''
;
},
/**
* Triggered on change of the multiselect.
*
...
...
@@ -675,12 +684,14 @@
// Support the label attribute on options.
var
label
=
this
.
options
.
optionLabel
(
element
);
var
classes
=
this
.
options
.
optionClass
(
element
);
var
value
=
$element
.
val
();
var
inputType
=
this
.
options
.
multiple
?
"
checkbox
"
:
"
radio
"
;
var
$li
=
$
(
this
.
options
.
templates
.
li
);
var
$label
=
$
(
'
label
'
,
$li
);
$label
.
addClass
(
inputType
);
$li
.
addClass
(
classes
);
if
(
this
.
options
.
enableHTML
)
{
$label
.
html
(
"
"
+
label
);
...
...
@@ -1227,6 +1238,7 @@
value
:
option
.
value
,
label
:
option
.
label
||
option
.
value
,
title
:
option
.
title
,
class
:
option
.
class
,
selected
:
!!
option
.
selected
,
disabled
:
!!
option
.
disabled
});
...
...
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