This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
I am trying to select all the checked on a page with jquery :checked selector but I am having problems with it.
I have a tab on website and within 2 of these tabs I have separate check boxes. So what I did was on all input checkboxes I put a class on them. So for tab one all those checkboxes would have say a css class called "tab1" and the second tab checkboxes would have "tab2".
I was then planning to do this:
To find all the checkboxes in tab one that are checked but this never finds anything.
However Some of the checkboxes I have get rendered on server side since the user might already have information in the database. So these seem to get rendered something like this
So when I do the above jquery on it I get all the checked boxes that are checked. It is just when I add the input boxes through jquery without this span tags around it I can't find any of the checked checkboxes. So I guess I could wrap all of them around with span tags but I just want to know why this is happening in the first place?