JQuery re-checking check boxes?

Why not try: for (id in savedShareIDs) $("input:checkboxvalue="+savedShareIDsid+""). Attr("checked", "checked").

Hrm .. maybe the ajax call is doing something in the DOM that makes it unhappy. – Jacob Jan 1 at 5:48 $("input:checkboxname=share_ids"). Each(function() { if ( $.

InArray( $(this).val(), savedShareIDs) > -1 ) { $(this). Attr('checked',true); $(this). Attr('checked','checked'); $(this).

Data('checked','checked'); str = "Re-Checking ". Concat($(this).val()); alert(str); } }); for (id in savedShareIDs) { $("input:checkboxvalue=" + id + ""). Attr("checked", true); } – Jacob Jan 1 at 5:50 OK then, try printing something out on each iteration to ensure that "input:checkboxname=share_ids" actually does select some elements.

– Marcus Whybrow Jan 1 at 5:59 I added this to the add part: str = "Added to array ". Concat($(this).val()); alert(str); and it does pop up and say 'Added to array 81' – Jacob Jan 1 at 6:06 Then on the re-checking part I added: str = "Re-Checking ". Concat($(this).val()); alert(str); and it also pops up and says "Re-Checking 81".

But still no checking happening. – Jacob Jan 1 at 6:06.

Try to change $(this). Attr('checked',true) to $(this). Attr('checked','checked').

Yer, I think you have to do this also. – Marcus Whybrow Jan 1 at 5:24 that does not matter. Html doesn't check what property is set for checked – Baz1nga Jan 1 at 5:36.

I am assuming that your logic is correct. But I have seen attr behave weirdly. Try using $(this).

Data('checked','checked') instead.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions