Skip to content
Browse files

fix old jquery bug with add option to select (all options makes selec…

…ted in multiselect)
  • Loading branch information...
1 parent 4f08460 commit 59fc55acacd214b55663ce4b5efecc5a07817ebc @simonoff committed Aug 4, 2008
Showing with 5 additions and 0 deletions.
  1. +5 −0 jquery.flatselect.js
View
5 jquery.flatselect.js
@@ -55,6 +55,11 @@ jQuery.fn.flatSelect = function(url,options) {
function(data) {
jQuery.each(data,function(a,b) {
flatSelect.find('select').append('<option value="'+ a +'">'+ b +'</option>');
+ // fix bug with another version of jquery
+ // all options set not selected
+ flatSelect.find('select option').each(function() {
+ this.selected = false;
+ });
flatSelect.find('.' + flat_name).append('<div id="'+ flat_name +'_div_' + a + '" class="' + options.nsclass + '">' + b +'</div>');
$('div#' + flat_name + '_div_' + a).bind(
'click',

0 comments on commit 59fc55a

Please sign in to comment.
Something went wrong with that request. Please try again.