I am making a Windows 8 Phone app using HTML 5 project template.
I have download jquery-1.9.1.js using nuget and also have downloaded jquery.mobile-1.2.0.js from here and have added them to my project.
Now I am using the following code, I am trying to use localStorage
, my below code works with Chrome and Firefox, but not with IE 10.
Common.js
$(document).ready(function(){
alert("jquery started");
localStorage.selectedCategory = "cc";
alert("After assignment");
alert(localStorage.selectedCategory);
})
When i run this in IE 10 I get the following error messages in console, and only my first alert "jquery started" is shown, the rest of the alerts are not shown.
SCRIPT5007: Unable to get property 'msie' of undefined or null reference jquery.mobile-1.2.0.js, line 2536 character 5
SCRIPT5007: Unable to set property 'selectedCategory' of undefined or null reference common.js, line 3 character 2
The moment I comment out the localStorage code, all alerts are shown, but still one of the error remains in the console.
SCRIPT5007: Unable to get property 'msie' of undefined or null reference jquery.mobile-1.2.0.js, line 2536 character 5
I just dont seem to understand the problem, please help me out on this.
EDIT : My html code :
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="/html/css/phone.css" />
<title>Interview QA</title>
<script type="text/javascript" src="../Scripts/jquery-1.9.1.js"></script>
<script type="text/javascript" src="../Scripts/jquery.mobile-1.2.0.js"></script>
<script type="text/javascript" src="../Scripts/Custom/common.js"></script>
</head>
<body>
<div id="header"></div>
<div id="footer"></div>
<div></div>
</body>
</html>