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
416bf64d
Commit
416bf64d
authored
Jan 08, 2013
by
David Stutz
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9 from najlepsiwebdesigner/master
2 lines of code added to add support for change event.
parents
aca02c24
63368815
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
index.html
index.html
+3
-1
bootstrap-multiselect.js
js/bootstrap-multiselect.js
+5
-1
No files found.
index.html
View file @
416bf64d
...
...
@@ -16,7 +16,9 @@
<body>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
()
{
$
(
'
#example1
'
).
multiselect
();
$
(
'
#example1
'
).
multiselect
({
onchange
:
function
(
el
,
checked
){
alert
(
'
change event invoked!
'
);
console
.
log
(
el
,
checked
)}
});
$
(
'
#example2
'
).
multiselect
();
$
(
'
#example3
'
).
multiselect
({
button
:
'
btn btn-link
'
...
...
js/bootstrap-multiselect.js
View file @
416bf64d
...
...
@@ -65,9 +65,12 @@
$
(
event
.
target
).
parents
(
'
li
'
).
removeClass
(
'
active
'
);
}
$
(
'
option[value="
'
+
$
(
event
.
target
).
val
()
+
'
"]
'
,
this
.
select
).
attr
(
'
selected
'
,
checked
);
var
$option
=
$
(
'
option[value="
'
+
$
(
event
.
target
).
val
()
+
'
"]
'
,
this
.
select
);
$option
.
attr
(
'
selected
'
,
checked
);
$
(
'
button
'
,
this
.
container
).
html
(
this
.
options
.
text
(
$
(
'
option:selected
'
,
this
.
select
))
+
'
<b class="caret"></b>
'
);
this
.
options
.
onchange
(
$option
,
checked
);
},
this
));
$
(
'
ul li a
'
,
this
.
container
).
on
(
'
click
'
,
function
(
event
)
{
...
...
@@ -99,6 +102,7 @@
}
},
container
:
'
<div class="btn-group" />
'
,
onchange
:
function
(){}
},
constructor
:
Multiselect
,
...
...
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