jQuery 1.9 .live() is not a function

前端 未结 10 1061
再見小時候
再見小時候 2020-11-22 03:46

I recently updated jQuery from 1.8 to 2.1. I suddenly discovered that the .live() stops working.
I get the error TypeError: $(...).live is not a funct

10条回答
  •  旧巷少年郎
    2020-11-22 04:05

    A very simple fix that doesn't need to change your code, just add jquery migration script, download here https://github.com/jquery/jquery-migrate/

    It supplies jquery deprecated but needed functions like "live", "browser" etc

提交回复
热议问题