Nevermind I figured it out.
- Justin
On Oct 20, 2:20 pm, Justin Kozuch <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I've hit a bit of a snag in some code I've repurposed for a form I'm
> creating:
>
> $(document).ready(function() {
> var termsagree = $("#termsagree");
> var inital = termsagree.is(":checked");
> var terms = $("#contractualreqs")[inital ? "removeClass" :
> "addClass"]("gray");
> var termsInputs = terms.find("input").attr("disabled", !inital);
>
> //$("#contractualreqs").hide();
> termsagree.click(function() {
> //$("#contractualreqs").show();
> terms[this.checked ? "removeClass" : "addClass"]("gray");
> termsInputs.attr("disabled", !this.checked);
> });
>
> var reqsagree = $("#reqsagree");
> var inital = reqsagree.is(":checked");
> var reqs = $("#supplierform")[inital ? "removeClass" : "addClass"]
> ("gray");
> var reqsInputs = reqs.find("input").attr("disabled", !inital);
>
> //$("#supplierform").hide();
> reqsagree.click(function() {
> //$("#supplierform").show();
> reqs[this.checked ? "removeClass" : "addClass"]("gray");
> reqsInputs.attr("disabled", !this.checked);
> });
>
> });
>
> What I would like to do is disable ALL input fields, including selects
> and textarea elements, which is something that is not happening right
> now.
>
> Does anyone have any insight on how to accomplish this? I figured
> that
>
> var termsInputs = terms.find("input").attr("disabled", !inital);
>
> would do it, but alas, it was not to be.
>
> Best,
>
> justin