Android calls my js method, and the settimeout in it doesn"t work. Why
function shareSuccesshide(){
$("-sharpshareSuccess").hide();
}
function shareFailurehide(){
$("-sharpshareFailure").hide()
}
function callback(data) {
if (browser.versions.ios || browser.versions.iPhone || browser.versions.iPad) {
if(data === 1){
$("-sharpshareSuccess").show();
setTimeout(function(){
$("-sharpshareSuccess").hide();
},2000);
}else if(data === 0){
$("-sharpshareFailure").show();
setTimeout(function(){
$("-sharpshareFailure").hide()
},2000);
}
}else if (browser.versions.android) {
if(data === 1){
//setTimeout
$("-sharpshareSuccess").show();
setTimeout("shareSuccesshide();",2000);
}else if(data === 0){
$("-sharpshareFailure").show();
setTimeout("shareFailurehide();",2000);
}
}
}