Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/389.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/sql/70.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
Javascript jquery mobile中的小部件未加载_Javascript_Jquery Mobile_Backbone.js_Requirejs_Underscore.js - Fatal编程技术网

Javascript jquery mobile中的小部件未加载

Javascript jquery mobile中的小部件未加载,javascript,jquery-mobile,backbone.js,requirejs,underscore.js,Javascript,Jquery Mobile,Backbone.js,Requirejs,Underscore.js,我正在为我的项目使用主干、require.js、下划线和jquery mobile。我注意到jquerymobile中的一些小部件并没有主要加载页眉和页脚。我怎样才能解决这个问题 使现代化 我的html <div id="connectionForm"> <div data-role="header" data-position="inline"> <a data-icon="delete">Cancel</a> <h1>

我正在为我的项目使用主干、require.js、下划线和jquery mobile。我注意到jquerymobile中的一些小部件并没有主要加载页眉和页脚。我怎样才能解决这个问题

使现代化 我的html

<div id="connectionForm">
<div data-role="header" data-position="inline">
    <a data-icon="delete">Cancel</a>
    <h1>Edit Contact</h1>
    <a data-icon="check">Save</a>
</div>
<input class="user-input" id="serviceUrl"/>
<a class="save-url btn" data-role="button" data-icon="check">Save</a>
下面是它使用firebug加载的小部件列表

button
function()

checkboxradio
function()

collapsible
function()

collapsibleset
function()

dialog
function()

listview
function()

navbar
function()

page
function()

selectmenu
function()

slider
function()

textinput
function()

widget
编辑不要紧,您的更新显示您已经在使用数据角色=标题

jquerymobile使用这些标记

<div data-role="header"></div> 
定义标题部分,而不是下面更常见的用法

<div class="header"></div>
<header></header> (html5)

解决了。默认情况下,jqm不会加载头小部件或在firebug的DOM选项卡上显示它。所以我升级到了1.1.0版本,一切都很顺利。

请包括相关代码。可能是加载jqm库的部分。我不太明白你的答案。我想我的问题是jqm没有加载header小部件。我只是不知道如何解决这个问题,但这是我的一个误解,我想你可能没有正确定义标题,而不是小部件没有加载到我的jqm中。
<div data-role="header"></div> 
<div class="header"></div>
<header></header> (html5)