#4119 closed bug (invalid)
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 })
Change History (3)
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
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.
comment:3 Changed 14 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
What does your markup look like? Do you have an element with an *id* of
checkbox
?