jQuery Event : Detect changes to the html/text of a div

后端 未结 13 2523
旧巷少年郎
旧巷少年郎 2020-11-22 06:15

I have a div which has its content changing all the time , be it ajax requests, jquery functions, blur etc etc.

Is there a way

13条回答
  •  梦如初夏
    2020-11-22 07:07

    You are looking for MutationObserver or Mutation Events. Neither are supported everywhere nor are looked upon too fondly by the developer world.

    If you know (and can make sure that) the div's size will change, you may be able to use the crossbrowser resize event.

提交回复
热议问题