'Destination DIV' disappearing in simple jQuery AJAX call

前端 未结 5 468
说谎
说谎 2021-01-24 21:35

Edit: Important: It is extremely unlikely that anybody who has come across this will have the exact same problem as me - check my answer below for my very obscu

5条回答
  •  自闭症患者
    2021-01-24 22:32

    append
    

    does not replace your div. It pastes the data at the back of your div.

    You could try

    replaceWith( content ) 
    

    instead.

    replaceWith in jQuery documentation

提交回复
热议问题