- // Add the events back to the original and its descendants
- $this.each(function() {
- var events = this._$events;
- for (var type in events)
- for (var handler in events[type])
- jQuery.event.add(this, type, events[type][handler], events[type][handler].data);
- this._$events = null;
- });
+ if (jQuery.browser.msie) {
+ // Add the events back to the original and its descendants
+ $this.each(function() {
+ var events = this._$events;
+ for (var type in events)
+ for (var handler in events[type])
+ jQuery.event.add(this, type, events[type][handler], events[type][handler].data);
+ this._$events = null;
+ });
+
+ // set selected values of select elements
+ var selects = r.find('select');
+ $this.filter('select').each(function(i) {
+ selects[i].selectedIndex = this.selectedIndex;
+ });
+ }