Tab on disabled input

后端 未结 5 1611
囚心锁ツ
囚心锁ツ 2021-02-20 04:18

I am implementing progressive UI disclosure pattern in my application. Using which I am disabling the next elements. So based on input of one element the next element is enabled

5条回答
  •  [愿得一人]
    2021-02-20 04:46

    It is better if we have some part of the code to understand better your problem.

    For this:

    I am implementing progressive UI disclosure pattern in my application. Using which I am disabling the next elements. So based on input of one element the next element is enabled.

    You must first handle an event for the first element and then in the callback function you need to enable/disable the second element, let say:

    For enable:

    $('#firstElement).on('click', function(){ $('#secondElement').removeAttr('disabled') })

    For disable:

    $('#firstElement).on('click', function(){ $('#secondElement').attr('disabled', 'disabled') })

    Hope this could help.

提交回复
热议问题