Skip to main content

Bug Tracker

Side navigation

#11674 closed bug (fixed)

Opened April 30, 2012 09:03PM UTC

Closed May 05, 2012 04:00PM UTC

Logic error/typo on :checked documentation

Reported by: reames@asymmetricventures.com 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"

Attachments (0)
Change History (1)

Changed May 05, 2012 04:00PM UTC by dmethvin comment:1

resolution: → fixed
status: newclosed

Thanks!