0
我下面的链接http://dev.jtsage.com/jQM-SimpleDialog/demos/string.html
使用jQuery Mobile的 创建对话框我已经定义在我的HTML以下类型错误的结果(这).simpledialog [未定义]是不是一个函数
<div data-role="popup" id="Savepopup" class="ui-corner-all" style="background: url(Image/PopupBackground.png); background-size: 100% 100%;background-repeat: no-repeat;">
<div id="datalink">
<a href="#" data-inline="true" data-rel="dialog" ><img src="Image/Button.png" width="100%" height="" ></a>
</div>
</div>
and in js file i have defined the following
$(document).delegate('#datalink', 'click', function() {
$(this).simpledialog({
'mode' : 'string',
'prompt' : 'What do you say?',
'buttons' : {
'OK': {
click: function() {
// var name = text($('#datalink').attr('data-string'));
//console.log("name name "+name);
alert("data was entered");
}
},
'Cancel': {
click: function() { },
icon: "delete",
theme: "c"
}
}
});
});
但当我点击按钮打开对话框时,我得到错误说$(this).simpledialog不是一个函数。 什么是我在做什么?..