Dynamic json listview trouble
Hi
here is my code.
----------------------------------
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <title>Page Title</title>
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="stylesheet" href="jquery.mobile-1.3.2/jquery.mobile-1.3.2.min.css" />
- <link rel="stylesheet" href="css/app-3.css">
- <script src="js/jquery-1.9.1.min.js"></script>
- <script src="jquery.mobile-1.3.2/jquery.mobile-1.3.2.js"></script>
- <title>test 4</title>
- </head>
- <body>
- <div data-role="Page" id="mainPage">
- <div data-role="header"><h1>Welcome!</h1></div>
- <div data-role="content">
- <ul data-role="listview" data-inset="false" data-filter="true" id="movieList">
-
- </ul>
- </div>
- </div>
- <script>
- $(document).ready(function(){
- $.ajax({
- url: "data/alarsin.json",
- dataType: "json",
- success:function(data){
- $(data.products).each(function(key, value){
- let records = '<li>'+value.product+'</li>';
- $('ul').append(records);
- });
- }
- });
- });
- </script>
- </body>
- </html>
--------------------------------------
output is not in listview..
how can i get to work in listview with auto refresh as well. please help.
kristtee