我想将我在项目中使用的JQuery版本从 1.4.2 升级到 1.11.3 。我目前使用的一些功能和属性如下。
.ready()
.show()
.hide()
.focus()
.blur()
.submit()
.click()
.change()
.attr() - both setter and getter
.append()
.html() - both setter and getter
.on(trigger,function(){})
.val() - both setter and getter
$('#elemId').removeClass("error").next("em").text("");
.removeAttr()
.css()
.text()
.addClass("error")
.height()
.is(‘:visible’)
$('#elemId').not('.checkrepeat').html("");
$('#elem').offset().top;
.detach();
$('#tabBox-bd').find('.con').eq(i).detach();
.length
如果有任何这些方法对我将要使用的新版本(1.11.3)不起作用,有人可以告诉我。并不是说我会坐下来等待你的回答。我还将在项目的许多地方更改版本并进行测试。我只是希望你们中的任何人已经通过类似的过程并提出任何建议。预先感谢您对我们的支持。
答案 0 :(得分:2)
我认为所有函数都可以在jquery 1.4.2版本中使用。
如果您发现任何问题,那么您可以使用jquery migrate插件进行后备,以便所有以前版本的功能都能正常工作。