jQuery Mobile doesn't work on android's browser

I'm trying to build a webbapp with jQuery Mobile. App works fine on chrome, firefox, safari and on iPhone/iPad but on android it doesn't show data. What could be the reason?

Here is the code I use:

$('#detailsPage').live('pageshow', function(event) {
    var id = getUrlVars()["id"];
    $.getJSON(serviceURL + 'getdata.php?id='+id, displayData);
});

function displayData(data) {
    var address = data.item;
    console.log(address);
    $('#osoite').text(address.OSO);
    $('#aika').text(address.AIKA);

}

function getUrlVars() {
    var vars = [], hash;
    var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
    for(var i = 0; i < hashes.length; i++)
    {
        hash = hashes[i].split('=');
        vars.push(hash[0]);
        vars[hash[0]] = hash[1];
    }
    return vars;
}

When I use the app with chrome, console gives the right object, but when I use eclipse's android emulator, console gives false.

EDIT Here is javascript code from the page that links to the page that doesn't work on android:

$('#ListPage').bind('pageinit', function(event) {
    getList();
});
setInterval ( "getList1()", 10000 );
var vanhadata = "";

function getEmployeeList1() {
    $.getJSON(serviceURL + 'getemployees.php?' + formArray, function(data) {
       if(JSON.stringify(data) != JSON.stringify(vanhadata)){ // vanhadata is not same as new data
            $('#nollalista li').remove();
            keikka = data.key;
            $.each(keikka, function(index, lista) {
                $('#nollalista').append('<li><a href="keikka.html?id=' + lista.IND + '">' +
                    '<h4>' + lista.OSO + '</h4>' +
                    '<img src="pics/' + lista.TILA + '.png"/>' +
                    '<p>' + lista.AIKA + '</p>' +'</a></li>');
        });
            $('#nollalista').listview('refresh');

            if(vanhadata != "")
                alert(localStorage.getItem("server"));        
            vanhadata = data;
        }
    });
}  

Answers


Need Your Help

Find OS type from .Net CF 1.0

c# windows-mobile compact-framework

What is the API for getting the OS type? Windows CE or Windows mobile? Environment.OSVersion just gives the CE version. It does not provide information if 'Windows Mobile' is installed on the

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.