jquery - show textbox when checkbox checked

后端 未结 7 649
伪装坚强ぢ
伪装坚强ぢ 2021-01-21 08:44

I have this form

7条回答
  •  [愿得一人]
    2021-01-21 09:49

    Maybe try selecting the next element only?

    change:

    if ($(this).is(':checked')) $('div.max_tickets').show();  
    

    to:

    if ($(this).is(':checked')) $(this).next('div.max_tickets').show();  
    

提交回复
热议问题