none
jquery closest control

    Question

  • Hi.

    I have the following page and the following code: 

      $(document).ready(function () {
                $(':radio').click(function () {
                    var $p = $(this).closest('textarea');
                    $p.attr("disabled", true);
                   
                });
              
            });

    How can I do to disable the textarea closest control from the radiobutton?

    When I look $p.lenght is 0. It means I can't find it.

    Thanks.

    Tuesday, July 16, 2013 5:24 PM

All replies