Skip to content
This repository has been archived by the owner on Jul 29, 2022. It is now read-only.

Commit

Permalink
I cannot duplicate problem with 7d8f735 - this code works in IE. This…
Browse files Browse the repository at this point in the history
… gets rid of an extra loop.
  • Loading branch information
dgm committed Jul 22, 2011
1 parent 0ca8b7f commit 39b77de
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions jquery.jeditable.js
Original file line number Diff line number Diff line change
Expand Up @@ -510,15 +510,13 @@
continue;
}
var option = $('<option />').val(key).append(json[key]);
$('select', this).append(option);
}
/* Loop option again to set selected. IE needed this... */
$('select', this).children().each(function() {
if ($(this).val() == json['selected'] ||
$(this).text() == $.trim(original.revert)) {
$(this).attr('selected', 'selected');
if (key == json['selected'] ||
json[key] == $.trim(original.revert)) {
$(option).attr('selected', 'selected');
}
});
$('select', this).append(option);
}

/* Submit on change if no submit button defined. */
if (!settings.submit) {
var form = this;
Expand Down

0 comments on commit 39b77de

Please sign in to comment.