Skip to content

Commit

Permalink
fix old jquery bug with add option to select (all options makes selec…
Browse files Browse the repository at this point in the history
…ted in multiselect)
  • Loading branch information
Alexander Simonov committed Aug 4, 2008
1 parent 4f08460 commit 59fc55a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions jquery.flatselect.js
Expand Up @@ -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',
Expand Down

0 comments on commit 59fc55a

Please sign in to comment.