Jquery mobile datebox不支持';在动态注入页面中弹出,jquery mobile

Jquery mobile datebox不支持';在动态注入页面中弹出,jquery mobile,jquery-mobile,Jquery Mobile,databox插件在静态jQuery移动html页面中运行良好。标头中定义的脚本包括: <link rel="stylesheet" href="http://code.jquery.com/mobile/latest/jquery.mobile.min.css" /> <link rel="stylesheet" type="text/css" href="http://dev.jtsage.com/cdn/datebox/latest/jquery.

databox插件在静态jQuery移动html页面中运行良好。标头中定义的脚本包括:

        <link rel="stylesheet" href="http://code.jquery.com/mobile/latest/jquery.mobile.min.css" />
    <link rel="stylesheet" type="text/css" href="http://dev.jtsage.com/cdn/datebox/latest/jquery.mobile.datebox.min.css" />
    <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
    <script src="http://code.jquery.com/mobile/latest/jquery.mobile.min.js"></script>
    <script type="text/javascript" src="http://dev.jtsage.com/cdn/datebox/latest/jquery.mobile.datebox.min.js"></script>
因此,我可以看到所有元素都显示得很好,包括datebox按钮。但是点击日期框按钮不会弹出任何内容

我比较了增强后的两个版本的html代码。我发现动态对话框遗漏了与日期对话框弹出窗口相对应的以下内容:

<div class="ui-datebox-container ui-overlay-shadow ui-corner-all ui-datebox-hidden pop ui-body-b"
    ...

我自己找到了一个解决方案。这就是改变

    $page.trigger('create');

但我不知道为什么,也不知道这两者的根本区别。救命啊

<div class="ui-datebox-container ui-overlay-shadow ui-corner-all ui-datebox-hidden pop ui-body-b"
    ...
    $page.trigger('create');
    $page.page();