Opened 11 years ago
Closed 11 years ago
#11674 closed bug (fixed)
Logic error/typo on :checked documentation
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
In the :checked selected documentation.
function countChecked() { var n = $("input:checked").length; $("div").text(n + (n <= 1 ? " is" : " are") + " checked!"); }
This function, the comparison should be n != 1. Otherwise for zero it reads "0 is checked"
Note: See
TracTickets for help on using
tickets.
Thanks!