Jquery show/hide resetting when page reloads

后端 未结 6 1836
萌比男神i
萌比男神i 2021-01-27 05:16

I\'m new to jquery, but I\'m trying to use it to create a multi-step tabbed form.

One one of the pages, I have radio buttons that will show several fields depending on t

6条回答
  •  北海茫月
    2021-01-27 06:03

    try after you configure the change event.

    if( $("input[name='paymentmethod']:checked").length > 0){
       $("input[name='paymentmethod']").change();
    }
    

    This means that after you load the page, check if there is an option selected and fire the event to get the behavior you want

提交回复
热议问题