php - Weird behavior with multipages jquery mobile -



php - Weird behavior with multipages jquery mobile -

finally made alter in code , went ok found unusual behaviour.

below code:

<!doctype html> <html> <head> <title>bugs administration</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.css" /> <script src="http://code.jquery.com/jquery-1.8.3.min.js"></script> <script src="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.js"></script> <script> var content; $(document).bind('pageinit',function (event) { $.ajax({ url: 'inc/getbugs.php', data: "", datatype: 'json', success: function(data) { (var = 0; < data.length; i++) { content = "<div data-role='collapsible' data-collapsed-icon='arrow-r' data-expanded-icon='arrow-d' data-iconpos='right'><h3> " + data[i].errorcode + ' - ' + data[i].title+ "</h3>" + "<ul data-role='listview' id='noth'>" content = content + '<li>project: ' + data[i].project+ '</li>' + '<li>type: ' + data[i].type + '</li>' + '<li>status: ' + data[i].status + '</li>' + '<li>severity: ' + data[i].severity + '</li>' + '<li>browser: ' + data[i].browser + '</li>' + '<li>creation date: ' + data[i].creationdate + '</li>' content = content + '</ul>'; content = content + "</div>";$("#set").append( content ); } $("#set").enhancewithin(); } }); }); </script> </head> <body> <div data-role="page" id="bugs"> <header data-theme="a" data-role="header"> <h1>&nbsp;</h1> </header> <div class="main" data-role="content"> <h3>lista de errores</h3> <div data-role="collapsible-set" id="set"><div> </div><!-- /content --> <footer data-role="footer" data-position="fixed"> <p>(c) copyright 2014</p> </footer> </div><!-- /page --> <div data-role="page" id="news"> <header data-theme="a" data-role="header"> <h1>&nbsp;</h1> </header> <div class="main" data-role="content"> </div><!-- /content --> <footer data-role="footer" data-position="fixed"> <p>(c) copyright 2014</p> </footer> </div><!-- /page --> </body> </html>

when run in chrome, bugs appears min after application repeats action added them twice

i tried different combinations don't know what's happenning this

php json jquery-mobile

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -