Skip to main content

Bug Tracker

Side navigation

#4119 closed bug (invalid)

Opened February 11, 2009 03:09AM UTC

Closed February 12, 2009 02:04AM UTC

Last modified March 14, 2012 12:08PM UTC

jQuery.each() ignors checkbox

Reported by: jbeckton Owned by:
Priority: major Milestone: 1.3.1
Component: unfiled Version: 1.3.1
Keywords: Cc:
Blocked by: Blocking:
Description
var fields = jQuery("#checkbox,#text1,#text2");
console.log(fields); //shows all 3 elements
jQuery.each(fields,function(){
  console.log(this.name + " = " + this.value); // missing checkbox
})
Attachments (0)
Change History (3)

Changed February 11, 2009 03:13AM UTC by dmethvin comment:1

What does your markup look like? Do you have an element with an *id* of

checkbox
?

Changed February 11, 2009 03:40AM UTC by jbeckton comment:2

Disregard... my stupid mistake.

the sample code I submitted does not show an if statement I was using to evaluate empty fields.

During the jQuery.each iteration I had something like if this.value == "", when it comes to checkboxes that would not be a valid expression.

Changed February 12, 2009 02:04AM UTC by dmethvin comment:3

resolution: → invalid
status: newclosed