Encountering a peculiar issue with the javascript confirm method - every time I call it, an error is thrown stating "Uncaught TypeError: Property 'confirm' of object [object Object] is not a function"
var confirmVal = window.confirm("Please confirm?");
if( confirmVal == true ){
return true;
}
The structure of my js files in the html is as follows:
<link rel="stylesheet" href="css/vendor/bootstrap.min.css">
<link rel="stylesheet" href="css/vendor/jquery-ui.css">
<script src="js/vendor/jquery-2.1.3.min.js"></script>
<script src="js/vendor/jquery-ui.js"></script>
<link rel="stylesheet" href="css/vendor/jquery.mobile-1.4.5.min.css">
<link rel="stylesheet" href="css/vendor/star-rating.css">
<link rel="stylesheet" href="css/vendor/toastr.min.css">
<script type="text/javascript" src="cordova.js"></script>
<script src="js/vendor/bootstrap.js"></script>
<script src="js/vendor/jquery.mobile-1.4.5.min.js"></script>
<script src="js/vendor/star-rating.min.js"></script>
<script type="text/javascript" src="js/vendor/toastr.min.js"></script>
Curiously enough, it works perfectly fine in another html file.. Any idea what could be going wrong here? Please assist.