$ .mobile.activePage未定义

时间:2011-07-20 09:01:56

标签: jquery jquery-mobile

$.mobile.activePage is undefined

有人对此有解决方法吗?

它正在被这样使用。

if ($.mobile.activePage.data("iscroll") == "enable") {
    fixed($.mobile.activePage);
}

这是在此之后,这是有效的。

$('a.numContact').live("click", function(e) {  
    e.preventDefault();
    var dataurl = $(this).attr("data-url");  
    if (dataurl != null)  
    $.mobile.changePage("loadMobis.php",{
            data:dataurl
    });   
});

这是一个错误吗?

1 个答案:

答案 0 :(得分:3)

更改第(99)行...

if ($.mobile.activePage.data("iscroll") == "enable") {

为...

if (($.mobile.activePage) && ($.mobile.activePage.data("iscroll") == "enable")) {

似乎解决了这个问题