Mobile Browser Detections & Redirection
To add any feature specifically intended for mobile smartphone browsers (e.g. a popover notification with native store app links), add detectmobilebrowser.js script and conditional logic before the closing </body> tag
Note: For this method to work, javascript must be enabled on the user's device (most mobile browsers support javascript by default).
<script type="text/javascript" src="/js/detectmobilebrowser.min.js"></script>
<script>
var test = mobileCheck(); //Check if mobile browser is detected from script
if(test === true){
/* If mobile browser is detected: display a message, alert, modal, etc */
$(".mobile-message").append("<div class='alert alert-info alert-dismissible fade in' role='alert'><button type='button' class='close' data-dismiss='alert' aria-label='Close'><span aria-hidden='true'>×</span></button><p>Download Our Free Mobile Smartphone App</p><div class='row margin-top-25'><div id='google-play' class='col-xs-12'><a href='https://play.google.com/store/apps/details?id=gov.mo.jobs&hl=en' id='google-play-logo' title='Google Play Store'><img src='/img/google_play_store.png' class='img-responsive' alt='Download Android App on Google Play'></a></div></div><div class='row margin-top-15'><div id='itunes-store' class='col-xs-12'><a href='https://itunes.apple.com/us/app/id926478267?mt=8' id='itunes-app-store-logo' title='iTunes App Store'><img src='/img/itunes_app_store.svg' class='img-responsive' alt='Download on the iTunes App Store'></a></div></div></div>");
}
</script>
</body>
var test = mobileCheck();
if(test === true){
//Do Stuff: Popover, Alert, Modal, Etc
}
Add ".mobile-message" class to any div element. For example: under <div class="page-header">
<div class="page-header">
<div class="mobile-message"></div>
<div id="breadcrumbs"></div>
</div>
To see the result, reload this page on a mobile browser or emulator
For more info on Google Chrome's devtools device emulation mode, read more.