|
1 | 1 | /*! |
2 | 2 | * jQuery Form Plugin |
3 | | - * version: 3.50.0-2014.02.05 |
| 3 | + * version: 3.51.0-2014.06.20 |
4 | 4 | * Requires jQuery v1.5 or later |
5 | | - * Copyright (c) 2013 M. Alsup |
| 5 | + * Copyright (c) 2014 M. Alsup |
6 | 6 | * Examples and documentation at: http://malsup.com/jquery/form/ |
7 | 7 | * Project repository: https://github.com/malsup/form |
8 | 8 | * Dual licensed under the MIT and GPL licenses. |
@@ -956,7 +956,7 @@ $.fn.formToArray = function(semantic, elements) { |
956 | 956 |
|
957 | 957 | // #386; account for inputs outside the form which use the 'form' attribute |
958 | 958 | if ( formId ) { |
959 | | - els2 = $(':input[form=' + formId + ']').get(); |
| 959 | + els2 = $(':input[form="' + formId + '"]').get(); // hat tip @thet |
960 | 960 | if ( els2.length ) { |
961 | 961 | els = (els || []).concat(els2); |
962 | 962 | } |
@@ -1188,13 +1188,13 @@ $.fn.clearFields = $.fn.clearInputs = function(includeHidden) { |
1188 | 1188 | else if (tag == 'select') { |
1189 | 1189 | this.selectedIndex = -1; |
1190 | 1190 | } |
1191 | | - else if (t == "file") { |
1192 | | - if (/MSIE/.test(navigator.userAgent)) { |
1193 | | - $(this).replaceWith($(this).clone(true)); |
1194 | | - } else { |
1195 | | - $(this).val(''); |
1196 | | - } |
1197 | | - } |
| 1191 | + else if (t == "file") { |
| 1192 | + if (/MSIE/.test(navigator.userAgent)) { |
| 1193 | + $(this).replaceWith($(this).clone(true)); |
| 1194 | + } else { |
| 1195 | + $(this).val(''); |
| 1196 | + } |
| 1197 | + } |
1198 | 1198 | else if (includeHidden) { |
1199 | 1199 | // includeHidden can be the value true, or it can be a selector string |
1200 | 1200 | // indicating a special test; for example: |
@@ -1275,4 +1275,3 @@ function log() { |
1275 | 1275 | } |
1276 | 1276 |
|
1277 | 1277 | })); |
1278 | | - |
0 commit comments