javascript - What is making JS not run on IE9 but ok on Firefox -


i'm learning js , working on simple codes practice. when testing basic code (one of simplest examples below), ie9 doesn't make run while firefox no problem. i've followed configuration guidelines in ie9>tools>internet options>security enable running of scripts, no avail. thought js/jquery code, troubleshoot tried simplest js code, ignored. missing?

<!doctype html> <html> <head>     <style>         div { color:blue; }         span { color:red; }     </style>     <script src="http://code.jquery.com/jquery-1.9.1.js"></script> </head> <body>     <div>         values stored         <span></span>         ,         <span></span>     </div>     <script>         $("div").data("test", { first: 16, last: "pizza!" });         $("span:first").text($("div").data("test").first);         $("span:last").text($("div").data("test").last);     </script> </body> 

$("div").data("beauty", { first: 16, last: "beast" }); $("span:first").text($("div").data("test").first); $("span:last").text($("div").data("test").last); 

it easier looks. have change beauty test, because assigned data beauty property , trying retrieve using test. jsfiddle

now code like:

$("div").data("test", { first: 16, last: "beast" }); $("span:first").text($("div").data("test").first); $("span:last").text($("div").data("test").last); 

Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -