我在我的应用程序中使用 jQuery Mobile Split View。它工作正常。
我只需要对某些页面进行 Split View,而对于我设置了 data-role="page"
的普通页面。
当我尝试加载除 Split View页面以外的普通页面时,出现以下错误
"TypeError: Result of expression 'toPage.data( "page" )' [undefined] is not an object."
在jquery.mobile-1.0.js行号2458
toPage.data( "page" )._trigger( "beforeshow", null, { prevPage: fromPage || $( "" ) } );
最佳答案
我遇到了同样的问题。这不会发生在所有页面上,只有几个页面会发生。
这不是解决方案,而是临时解决方法。
只需围绕此语句进行尝试即可:P 您的应用程序将正常运行。它不会影响您的应用程序的工作。
如果你能找到这个错误背后的真正问题,请告诉我。
关于javascript - 类型错误 : Result of expression 'toPage.data( "page")' [undefined] is not an object - in jquery mobile,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9819570/