Commit 7af40c0b authored by David Stutz's avatar David Stutz

Changed to .attr() for setting options selected.

parent 845904b7
......@@ -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);
}
......
......@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment