Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8529815
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:06:54+00:00 2026-06-11T09:06:54+00:00

I use jquerymobile and now i want to put li inside to a ul

  • 0

I use jquerymobile and now i want to put li inside to a ul listview with json.

I have to follow code:

<script type="text/javascript">
$(function() {
$(document).ready(function(){

        $.getJSON("url",function(data) {
                $.each(data.posts, function(i,data){

                $('#output').children('ul').append('<li><a href="#">'+data.title+'</a></li>');

                });
            }
        );
        return false;
    });
});
</script>


<div data-role="content">
    <div class="content-primary">   
        <div id="output">
               <ul data-role="listview">

                </ul>
            </div>
            </div>
</div>

It works but not inside the .

Does anyone now how i can fix this?

Kind regards,
Tom

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T09:06:55+00:00Added an answer on June 11, 2026 at 9:06 am

    The choice of child/children may be throwing it off a bit, give this a try, and see if that makes a difference.

    $('#output ul').append(..........);
    

    Since you are appending these list items to a list after the DOM is loaded, and are using jQueryMobile you will have to add an additional item to the chain of functions for the element. like so:

    $('#output ul').append(..........).trigger('create');
    

    Create is a jquery mobile event. that is fired off when the DOM is initially loaded, styling all elements that are in the DOM when its loaded. However by adding new ones they won’t have the styling as jquerymobile doesn’t rely on css through conventional stylesheet relations. It uses stylesheets for the styling but the styling gets applied according to the container types example

    data-role="header" gets styled after the dom is loaded, so even if you styled the specific element using conventional methods with CSS jquery mobile will override it after the DOM is ready

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using jquerymobile theming, I want the navbars in the header to use a different
I have a problem if i want to insert this json test into my
I have a JQuery mobile app. I now want to deploy it natively to
I'm trying to figure out how to use https://github.com/azicchetti/jquerymobile-router in my Spine project. I'm
I want use JQuery mobile for the front-end of my mobile application, but I
i want to use a icon in jQuery Mobile on a span element...and i
use C#,want to upload excel file on google doc. bellow syntax use to upload
I've worked with JqueryMobile to build HTML5 mobile apps. I use a cache manifest
hi I just finished designing a mobile web app and now want to start
Can someone tell me for what i can use jquerymobile ? Can i use

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.