ajax - JQuery Mobile Loop to add items -
how loop , add list items in jquery mobile?
something found using php:
while($row = mysql_fetch_array($result)) { echo "<li><h2>" . $row['post_title'] . "</h2>" . $row['post_content'] . "<p class='ui-li-aside'>" . $row['post_date'] . "<strong></p>"; }
but not using php in project (using c# webservice,jquerymobile). assuming need add 5 list items stored in variable count
, how can achieve in jquery mobile?
any idea can find jquery mobile tutorials uses c# web service talk database?
thanks in advance...
lucky you, jquery mobile inherits of jquery's behaviors. iterating on collection, try using ".each()" so:
$(count).each(function(index) { // add item container here });
jquery documented, , relevant documentation .each()
here: http://api.jquery.com/each/. learn love docs.
Comments
Post a Comment