i have an app which can either run as a hybrid or html5 app 
 I tried
pre 
 if (typeof cordova !== 'undefined') { 
     //we are hybrid 
     //do hybrid stuff 
 } else { 
     //we are an html5 app 
     //do html5 only stuff 
 } 
 /pre
it didn't work and always ran the html5 stuff, so I added alert(typeof cordova); into my code and I found that the corova object was 'undefined' even in my hybrid app (android apk) running on device.
Why is this, I know that i have used this technique before?
What I am trying to do is show a spash screen only if it is a html5 app bu not if it is hybrid.
My actual code is as follows: 
 pre 
 alert(typeof cordova); 
 console.log(typeof cordova); 
 if (typeof cordova !== 'undefined') { 
     Apperyio.navigateTo('Login', {transition:'flip', reverse:false}); 
 } else { 
     setPadding(); 
     $(window).resize(function() { 
         setPadding(); 
     }); 
     Apperyio('logo_grid').show(); 
     setTimeout(function() { 
         Apperyio.navigateTo("Login", {transition:'flip', reverse:false}); 
     }, 3000); 
 }/pre
If it is hybrid, it should jump straight to the login screen
logo_grid is a grid component containing the splash image