From 7ee75854a0c6f4d00af785032ddfbd57b55dc2c8 Mon Sep 17 00:00:00 2001 From: Aleksey Kuznietsov Date: Tue, 16 Jun 2020 20:12:10 -0400 Subject: [PATCH] prop() instead of attr() for regular control The proper way to select values in prop(), instead of attr(). Values which has been set up with attr() cannot be cleared!! And this is big problem that cost more than 10 hours of my life today and before when I did not believe in this bug and tried many workarounds! --- js/jquery.multi-select.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/jquery.multi-select.js b/js/jquery.multi-select.js index 2d70e38..d9898bb 100644 --- a/js/jquery.multi-select.js +++ b/js/jquery.multi-select.js @@ -372,7 +372,7 @@ selectables.addClass('ms-selected').hide(); selections.addClass('ms-selected').show(); - options.attr('selected', 'selected'); + options.prop('selected', 'selected'); that.$container.find(that.elemsSelector).removeClass('ms-hover');