The code below is just expected to alert users on lower versions than IE 10 of Internet Explorer. The line if (($.browser.msie) && ($.browser.version == '10.0')) {
is causing an error. Could you please help fix it.
<script type="text/javascript">
jQuery(document).ready(function($) {
// Detect if the browser is IE and find out the version.
// Alert user if the version is less than IE 11
var div = document.createElement("div");
div.innerHTML = "<!--[if lt IE 11]><i></i><![endif]-->";
// true if it is lower than IE11
var isIeLessThan11 = (div.getElementsByTagName("i").length == 1);
// According to wikipedia, conditional comments are not supported in IE10 and above.
// So find out if the version is IE 10.
var isIe10 = false;
if (($.browser.msie) && ($.browser.version == '10.0')) {
isIe10 = true;
}
if ((isIe10) || (isIeLessThan11) ) {
alert("Your web browser is out of date. Please complete this form using an approved browser, such as Edge, Chrome, Safari, or Firefox.");
} else {
alert("Your browser is supported");
}
});
</script>