javascript - Jquery not working in Windows8 HTML 5 App -
i created new windows 8 html 5 app. added jquery file it. hello world!
not getting printed in textbox
mainpage.xaml.cs
private void browser_loaded(object sender, routedeventargs e) { // add url here browser.isscriptenabled = true; browser.navigate(new uri(mainuri, urikind.relative)); }
html
<!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>windows phone</title> <script type="text/javascript" src="~/scripts/jquery-2.0.0.min.js"></script> <script type="text/javascript"> $(document).ready(function (){ $("#test").val("hello world!"); }); </script> </head> <body> <div> <p>climate</p> </div> <div id="page-title"> <p>my climate</p> <input type="text" id="test" /> </div> </body> </html>
my guess "~/" in script uri isn't interpreted correctly or uri otherwise incorrect. know fact jquery works fine in w8 apps.
Comments
Post a Comment