My scenario: I'm trying to mask some input fields using jQuery Inputmask Plugin. It is ok on Chrome, Opera, Safari, IE10, Firefox, but not on IE8!
I created a dummy page to test if other scripts was interfering, but isn't the case.
HTML
<!doctype html>
<html>
<head>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="inputmask/inputmask.js"></script>
<script type="text/javascript" src="inputmask/jquery.inputmask.js"></script>
<script type="text/javascript" src="inputmask/inputmask.extensions.js"></script>
<script type="text/javascript" src="inputmask/inputmask.dependencyLib.jquery.js"></script>
<script type="text/javascript" src="inputmask/inputmask.numeric.extensions.js"></script>
<script type="text/javascript" src="inputmask/inputmask.phone.extensions.js"></script>
<script type="text/javascript" src="inputmask/inputmask.regex.extensions.js"></script>
<!--[if lte IE 8]>
<script type="text/javascript" src="js/ie8customscripts.js"></script>
<link href="css/ie8customstyles.css" rel="stylesheet" type="text/css">
<![endif]-->
<!--[if IE 9]>
<script type="text/javascript" src="js/ie9customscripts.js"></script>
<link href="css/ie9customstyles.css" rel="stylesheet" type="text/css">
<![endif]-->
</head>
<body>
cpf<br/><input id="cpf" type="text"></input>
cnpj<br/><input id="cnpj" type="text"></input>
</body>
</html>
JS (ie8customscripts.js)
$(function(){
$("#cpf").inputmask("99-9999999"); //static mask
$("#cnpj").inputmask({"mask": "(999) 999-9999"}); //specifying options
});
In my actual pages, i was using data-
attributes to set the mask, which obviously didn't worked on IE8, so i tried to do this way.
Here's the exact line that throws the error (it is thrown about 20 times).
Until where I know, it was supposed to work on IE8, right?