Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/97.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
jQueryMobile+;iOS上的PhoneGap没有';不要在ajax加载的内容上应用标记_Ios_Cordova_Jquery Mobile - Fatal编程技术网

jQueryMobile+;iOS上的PhoneGap没有';不要在ajax加载的内容上应用标记

jQueryMobile+;iOS上的PhoneGap没有';不要在ajax加载的内容上应用标记,ios,cordova,jquery-mobile,Ios,Cordova,Jquery Mobile,我有一个使用jquerymobile+phonegap创建的移动应用程序。安卓版本非常好用。我在iOS版本中使用了相同的html+css+javascript文件。当我在XCode iPhone 6.0模拟器中运行该应用程序时,所有的jquery移动元素都是非样式化的,对于带有搜索的listview,搜索不起作用。就好像jquery移动插件没有运行一样 我使用ajax加载内容,然后在父页面元素上触发“create” 这是index.html页面的一部分。在页面的头部,我加载jquery、jque

我有一个使用jquerymobile+phonegap创建的移动应用程序。安卓版本非常好用。我在iOS版本中使用了相同的html+css+javascript文件。当我在XCode iPhone 6.0模拟器中运行该应用程序时,所有的jquery移动元素都是非样式化的,对于带有搜索的listview,搜索不起作用。就好像jquery移动插件没有运行一样

我使用ajax加载内容,然后在父页面元素上触发“create”

这是index.html页面的一部分。在页面的头部,我加载jquery、jquery mobile js和css:

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="format-detection" content="telephone=no" />
    <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=medium-dpi" />
    <link rel="stylesheet" type="text/css" href="css/themes/mobiletheme.min.css" />
    <link rel="stylesheet" type="text/css" href="css/jquery.mobile.structure-1.2.0.min.css" />
    <title>App Name</title>
    <script type="text/javascript" src="cordova-2.3.0.js"></script>
    <script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="js/myown.js"></script>        
    <script type="text/javascript" src="js/jquery.mobile-1.2.0.min.js"></script>
    <script type="text/javascript" src="js/index.js"></script>        
    <script type="text/javascript">
        app.initialize();
    </script>
</head>
<body>
<div data-role="page" id="thepage">
   <div data-role="header">Header code here</div>
   <div data-role="content" id="thecontent">
       Content is loaded here using ajax
   </div>
   <div data-role="footer">Footer code here</div>
</div>
</body>
这在Android中运行良好。但在iOS中,触发器(“create”)似乎什么也没做

有人经历过这样的事情吗?任何关于如何解决这一问题的想法都将受到赞赏


谢谢。

使用$(“页面”).trigger('pagecreate');谢谢你的回复。我试过了,没变。最后我找到了原因。jquery移动结构css没有与其他文件一起复制到iOS开发环境中。不知道为什么会发生这种情况,但当我复制丢失的文件时,情况开始变得正常。
$.ajax({
     url: 'http://www.thedomain.com/thepage.php',
     dataType: 'html',
     type: 'GET',
     success:function(data, textStatus, xhr){
        $("#thecontent").html(data);
        $("#thepage").trigger('create');
     }
});