Upgrade jQuery 1.4.2 to 1.9.1

前端 未结 4 778
鱼传尺愫
鱼传尺愫 2020-12-29 09:30

We have been using jQuery 1.4.2 in our web application. Recently it was suggested that we upgrade to a newer version. So far we are thinking about upgrading to 1.9.1 as we n

4条回答
  •  鱼传尺愫
    2020-12-29 10:01

    Just look at the deprecated functions still in your code; the big ones to watch out for are .live() and .delegate() which have been replaced with .on(), .attr() for which .prop() is the replacement, and .browser(). I've been updating my code as new versions came along and it's been pretty easy (about 20K lines of js) so you shouldn't have any problems. Just start with the functions I mentioned and I think that'll solve most of the issues. Then, look at the Migrate plugin.

提交回复
热议问题