Link to home
Start Free TrialLog in
Avatar of curiouswebster
curiouswebsterFlag for United States of America

asked on

Need to use jQuery to toggle this jqGrid checkbox

I have the following code which I need to understand, then be able to toggle the checbox to unchecked.  I don't understand how at the same time there can be a filter, a return value, hiding and adding attributes, and WAI-ARIA support to boot.

So when I need to make the checkbox unchecked, I am confused.
I have not yet read about the t3() function, so a little explanation of that may help.

$("span[t3parent=global_select]", $("#mydata tr.jqgrow").filter(function (index) {
return $("td[aria-describedby=mydata_PermitAccess][title=true]", this).length == 0;
}).hide().attr("directaccess", "no")).attr("t3parent", "root");

So I need to do all this AND toggle the checkbox to unchecked.

Any help or explanation would be appreciated.

Thanks!
Avatar of Gurvinder Pal Singh
Gurvinder Pal Singh
Flag of India image

what is the checkbox id or the class?
Is there a reference to checkbox object in the code above?
Avatar of curiouswebster

ASKER

No. I do not think so in that code above. But I started to write the following after drilling down with Firebug and was told I was "getting close" after writing the following:

$("td a.checkbox[aria-describedby=mydata_PermitAccess][title=true]").attr("checkbox", "unchecked");

I think my problem was here: attr("checkbox", "unchecked");

I wasn't sure of the syntax for the attr() function and think I do indeed need to find how to reference the class there. Not sure how...
ASKER CERTIFIED SOLUTION
Avatar of Gurvinder Pal Singh
Gurvinder Pal Singh
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Great. But where do I fit in the initial code in this post? I get confused by the return value, etc.
i have only modified the code given in your previous comment
Thanks for the help!