我是 Jquery 移动版的新手。
当我导航到另一个页面时,我试图从下面的代码中说 # display2 来获得滑动效果。
但我无法获得幻灯片效果。
如果我删除 rel="external" 我可以滑动但在#display2(我将导航到的页面)上,查询字符串值返回为空。
所以如果我把 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');
}
});
});