jquery: Uncaught TypeError: Object [object Object] has no method 'live'

来源:互联网 发布:telnet端口退出 编辑:程序博客网 时间:2024/06/05 18:12

使用jquery  $('#home').live('pagecreate',function(){})

$().ready(function() {      $('#home').on('pagecreate',function(){  if (string_contains(window.location.hash, "#set") == true)  {      var setnum = (window.location.hash.match(/\d+/));    $.mobile.changePage("subject_detail.html" + setnum, {transition: "slideup"});  }  });});

出现了  Uncaught TypeError: Object [object Object] has no method 'live' 的问题


查看了 http://api.jquery.com/live/接口,发现live已经在1.7被删除了,在1.7后换成了on


1 0
原创粉丝点击