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
7af40c0b
Commit
7af40c0b
authored
Oct 05, 2013
by
David Stutz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed to .attr() for setting options selected.
parent
845904b7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
8 deletions
+6
-8
bootstrap-multiselect.js
js/bootstrap-multiselect.js
+6
-6
tests.html
tests.html
+0
-2
No files found.
js/bootstrap-multiselect.js
View file @
7af40c0b
...
...
@@ -223,7 +223,7 @@
}
if
(
checked
)
{
$option
.
prop
(
'
selected
'
,
true
);
$option
.
attr
(
'
selected
'
,
true
);
if
(
this
.
options
.
multiple
)
{
// Simply select additional option.
...
...
@@ -236,7 +236,7 @@
}
$
(
$checkboxesNotThis
).
prop
(
'
checked
'
,
false
);
$optionsNotThis
.
removeAttr
(
'
selected
'
).
prop
(
'
selected
'
,
false
);
$optionsNotThis
.
removeAttr
(
'
selected
'
).
attr
(
'
selected
'
,
false
);
// It's a single selection, so close.
this
.
$button
.
click
();
...
...
@@ -248,7 +248,7 @@
}
else
{
// Unselect option.
$option
.
removeAttr
(
'
selected
'
).
prop
(
'
selected
'
,
false
);
$option
.
removeAttr
(
'
selected
'
).
attr
(
'
selected
'
,
false
);
}
this
.
updateButtonText
();
...
...
@@ -314,7 +314,7 @@
// Will build an dropdown element for the given option.
createOptionValue
:
function
(
element
)
{
if
(
$
(
element
).
is
(
'
:selected
'
))
{
$
(
element
).
attr
(
'
selected
'
,
'
selected
'
).
prop
(
'
selected
'
,
true
);
$
(
element
).
attr
(
'
selected
'
,
'
selected
'
).
attr
(
'
selected
'
,
true
);
}
// Support the label attribute on options.
...
...
@@ -495,7 +495,7 @@
$checkbox
.
prop
(
'
checked
'
,
true
);
$option
.
attr
(
'
selected
'
,
'
selected
'
).
prop
(
'
selected
'
,
true
);
$option
.
attr
(
'
selected
'
,
'
selected
'
).
attr
(
'
selected
'
,
true
);
this
.
options
.
onChange
(
$option
,
true
);
}
...
...
@@ -521,7 +521,7 @@
$checkbox
.
prop
(
'
checked
'
,
false
);
$option
.
removeAttr
(
'
selected
'
).
prop
(
'
selected
'
,
false
);
$option
.
removeAttr
(
'
selected
'
).
attr
(
'
selected
'
,
false
);
this
.
options
.
onChange
(
$option
,
false
);
}
...
...
tests.html
View file @
7af40c0b
...
...
@@ -8,12 +8,10 @@
<link
rel=
"stylesheet"
href=
"css/bootstrap-3.0.0.min.css"
type=
"text/css"
>
<link
rel=
"stylesheet"
href=
"css/bootstrap-multiselect.css"
type=
"text/css"
>
<link
rel=
"stylesheet"
href=
"css/prettify.css"
type=
"text/css"
>
<script
type=
"text/javascript"
src=
"js/jquery-2.0.3.min.js"
></script>
<script
type=
"text/javascript"
src=
"js/bootstrap-3.0.0.min.js"
></script>
<script
type=
"text/javascript"
src=
"js/bootstrap-multiselect.js"
></script>
<script
type=
"text/javascript"
src=
"js/prettify.js"
></script>
</head>
<body>
<a
href=
"https://github.com/davidstutz/bootstrap-multiselect"
><img
style=
"position: absolute; top: 0; right: 0; border: 0;"
src=
"https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"
alt=
"Fork me on GitHub"
></a>
...
...
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