Disabling radio buttons with jQuery

前端 未结 8 633
鱼传尺愫
鱼传尺愫 2020-12-05 01:28

I\'m trying to disable these radio buttons when a the loadActive link is clicked but for some reason it only disables the first in the order and then skips the rest.

相关标签:
8条回答
  • 2020-12-05 02:30

    Remove your "each" and just use:

    $('input[name=ticketID]').attr("disabled",true);
    

    That simple. It works

    0 讨论(0)
  • 2020-12-05 02:32

    just use jQuery prop

     $(".radio-button").prop("disabled", false);
     $(".radio-button").prop("disabled", true); // disable
    
    0 讨论(0)
提交回复
热议问题