Skip to content

Commit 0cd98cd

Browse files
committed
Update documentation to use standard form selectors, e.g. input[type=radio] instead of :radio.
1 parent 215f89f commit 0cd98cd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

jquery.form.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -924,19 +924,19 @@ $.fn.fieldSerialize = function(successful) {
924924
* <input name="C" type="radio" value="C2" />
925925
* </fieldset></form>
926926
*
927-
* var v = $(':text').fieldValue();
927+
* var v = $('input[type=text]').fieldValue();
928928
* // if no values are entered into the text inputs
929929
* v == ['','']
930930
* // if values entered into the text inputs are 'foo' and 'bar'
931931
* v == ['foo','bar']
932932
*
933-
* var v = $(':checkbox').fieldValue();
933+
* var v = $('input[type=checkbox]').fieldValue();
934934
* // if neither checkbox is checked
935935
* v === undefined
936936
* // if both checkboxes are checked
937937
* v == ['B1', 'B2']
938938
*
939-
* var v = $(':radio').fieldValue();
939+
* var v = $('input[type=radio]').fieldValue();
940940
* // if neither radio is checked
941941
* v === undefined
942942
* // if first radio is checked

0 commit comments

Comments
 (0)