diff --git a/jquery.select-to-autocomplete.js b/jquery.select-to-autocomplete.js index f298925..35fac3e 100644 --- a/jquery.select-to-autocomplete.js +++ b/jquery.select-to-autocomplete.js @@ -55,9 +55,9 @@ THE SOFTWARE. attrs[key] = raw_attrs[i].nodeValue; } }; + $text_field.attr( attrs ); } - return $text_field.attr( attrs ) - .val( $select_field.find('option:selected:first').text() ) + return $text_field.val( $select_field.find('option:selected:first').text() ) .insertAfter( $select_field ); }, extract_options: function( $select_field ) {