summaryrefslogtreecommitdiffstats
path: root/jquery.multiple.select.js
diff options
context:
space:
mode:
Diffstat (limited to 'jquery.multiple.select.js')
-rw-r--r--jquery.multiple.select.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/jquery.multiple.select.js b/jquery.multiple.select.js
index d45f31f..545a28d 100644
--- a/jquery.multiple.select.js
+++ b/jquery.multiple.select.js
@@ -290,6 +290,16 @@
if (that.options.single && that.options.isOpen && !that.options.keepOpen) {
that.close();
}
+
+ if (that.options.single) {
+ var clickedVal = $(this).val();
+ that.$selectItems.filter(function() {
+ return $(this).val() == clickedVal ? false : true;
+ }).each(function() {
+ $(this).prop('checked', false);
+ });
+ that.update();
+ }
});
},