JQuery Mobile Popup无法显示

时间:2015-06-18 02:38:46

标签: ajax xml jquery-mobile popup

我从XML文档中提取信息,其中一条信息是城市。当它显示城市时,我希望城市名称的文本成为弹出窗口的链接,该弹出窗口显示城市网站的链接。我拥有它,以便城市显示为链接..但是当我点击它没有任何反应。

以下是我从xml中提取信息的代码。

Parse.Cloud.job("Loader", function(request, status) {
    var allHttpResponseTexts = '';

    var query = new Parse.Query("Codes");
    query.each(function(a) {
        return Parse.Cloud.httpRequest({
            url: 'http://example.com',
            success: function(httpResponse) {
                // Process httpResponse.text here

                allHttpResponseTexts += httpResponse.text.substr(0, 50);
            }
        });
    }).then(function(httpResponse) {
        status.success("Saved successfully. allHttpResponseTexts: " + allHttpResponseTexts);
    }, function(error) {
        status.error("Uh oh, something went wrong. " + error.code + ' - ' + error.message);
    });
});

这是我的div我想用作弹出窗口..

function parseXML(xml) {
            $(xml).find('flight').each(function () {
                $("#F"+n).html("<span id = 'FC"+n+"'></span>"+
                    "<br />Country: "+ $(this).find("country").text() +
                    "<br />Description: "+ $(this).find("description").text() +
                    "<br />Airline: "+ $(this).find("airline").text() +
                    "<br />Flight Time: "+ $(this).find("flighttime").text() +
                    "<br />Flight Cost: " + $(this).find("flightcost").text());
                $("#FC" + n).html("City: <a href='#pop" + n + "' data-rel='popup' data-transition='pop'>" + $(this).find("city").text() +
                    "</a>");
                n++;
            });

当我将鼠标悬停在城市名称上时,它在链接末尾有“/#pop0”,所以我不知道它为什么不起作用

有人可以帮助我吗?

0 个答案:

没有答案
相关问题