problem with dividers
problem with dividers
in the next file when i run it . the list it create for me have two name 'house' and 'tree'. the problem that the list is not autodividers , only when i search for name in the list it make the list with dividers
- <!DOCTYPE html>
- <html>
- <head>
- <title>First jQuery Mobile Example</title>
- <!-- the three things that jQuery Mobile needs to work -->
- <link rel="stylesheet" href="jquery.mobile-1.4.2/jquery.mobile-1.4.2.css" />
- <script src="jquery-1.11.0.js" type="text/javascript"></script>
- <script src="jquery.mobile-1.4.2/jquery.mobile-1.4.2.js" type="text/javascript"></script>
- <meta name="viewport" content="width=device-width"/>
- </head>
- <body>
- <!-- This is the first page -->
- <section id="firstpage" data-role="page">
- <div data-role="header">
- <h1>Page Content Header</h1>
- </div>
- <ol data-role="listview" data-autodividers="true" data-filter="true" data-inset="true" id="listOfItemes">
- </ol>
- <div class="ui-content" role="main">
- <p>This is the content on page 1</p>
- <p><a href="#secondpage">Go to second page</a></p>
- </div>
- <div data-role="footer">
- <h2>Page Content Footer</h2>
- </div>
- </section>
- <!-- This is the second page -->
- <div id="secondpage" data-role="page">
- <div data-role="header">
- <h1>Page Content Header</h1>
- </div>
- <div class="ui-content" role="main">
- <p>Page 2 has different content on it</p>
- <p><a href="#firstpage">Go to first page</a></p>
- </div>
- <div data-role="footer">
- <h2>Page Content Footer</h2>
- </div>
- </div>
- <script>
- var output = '';
- $.ajax({
- url: 'https://c9.io/a1_shay/blabla/workspace/myFirstJson.json',
- dataType: 'json',
- type: 'get',
- cache: false,
- success: function(data)
- {
- $(data.articles).each(function(index, value)
- {
- output += '<li>' + value.name + '</li>';
- }
- )
- console.log(output);
- var update = document.getElementById('listOfItemes');
- update.innerHTML = output;
- }
- })
- </script>
- </body>
- </html>