【发布时间】:2013-07-31 17:03:45
【问题描述】:
我是 Jquery 移动版的新手。
当我导航到另一个页面时,我正在尝试获得滑动效果,例如以下代码中的 #display2。
但我无法获得幻灯片效果。
如果我删除 rel="external" 我可以滑动但在#display2(我将导航到的页面)上,查询字符串值返回为 null。
所以如果我把 rel="external" 参数传递给 #display2 但幻灯片转换不起作用。 如果我删除 re="external" 幻灯片有效,但查询字符串参数返回 null。
你能告诉我有没有办法让他们两个一起工作。
('#display').on('pagebeforeshow', function () {
// $(this).find('[data-role=header] .ui-title').text(json.getLOBXMLResult[currentItem].FolderName);
$.ajax("AppstoreWS.svc/getLOBXML", {
beforeSend: function (xhr) {
$.mobile.showPageLoadingMsg();
},
complete: function () {
$.mobile.hidePageLoadingMsg();
},
contentType: 'application/json',
dataType: 'json',
type: 'GET',
error: function () {
//alert('Something awful happened');
},
success: function (data) {
result1 = data.getLOBXMLResult;
$('#categoryList').children().remove('li');
$.each(result1, function (index, output) {
$('#categoryList').append('<li><a href="?platform=' + output.FolderName + '&sid=test#display2" data-transition="slide" rel="external">' + output.FolderName + '</a></li>');
});
$('#categoryList').listview('refresh');
}
});
});
【问题讨论】:
标签: javascript jquery-mobile slide