I’m using phonegap 1.1.0 and jquery mobile rc1.
The following code works as expected in firefox 7.0.1 (it does not enter in the body of if statement if id_element_to_modify is not null).
When running on android emulator i got the two alert displayed with
“id_element_to_modify1:null” and
“id_element_to_modify2:null”
Is it a bug ?
var id_element_to_modify = window.localStorage.getItem("id_hour_to_modify_or_delete");
alert("id_element_to_modify1:" + id_element_to_modify);
if (null != id_element_to_modify){
alert("id_element_to_modify2:" + id_element_to_modify);
}
With phonegap-1.1.0, jquery-1.6.4, and jquery.mobile-1.0rc1, on android emulator, the following solution works for me.