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 6471139
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:11:25+00:00 2026-05-25T06:11:25+00:00

when appending items to my list, the complete style of jquery mobile is gone…

  • 0

when appending items to my list, the complete style of jquery mobile is gone… dont know how to fix this?

This is currently working: when not appending the list-items, all styles are fine.

<div class="ui-grid-a">
                <div class="ui-block-a" id="blockaid">
                    <ul id="leftnav" data-role="listview" data-theme="g" data-filter="true" >

                        <li><a href="index.html">
                                <img src="images/bb.jpg" />
                                <h3>Firstname Lastname</h3>
                                <p>123456789</p>
                            </a></li>
                    </ul>

                </div>

               <div class="ui-block-b">
                ...

But if I start using to read the data from else where, all styles are gone:

        $(document).ready(function() {

            $.ajax({
                url: 'test.xml', 
                dataType: "xml",
                success : parse,
                error : function (xhr, ajaxOptions, thrownError){  
                    alert(xhr.status);          
                    alert(thrownError);
                } 


            });

            function parse(document){
                $(document).find("Details").each(function(){


                    $("#leftnav").append(


                    '<li>' + '<a href="#">' + '<img src="images/album-xx.jpg" />' +
                        '<h3>' + $(this).find('Name').text() + '</h3>' +
                        '<p>' + $(this).find('Number').text() + '</p>' +
                        '</a>' + '</li>'
                );
                });
            }
        });

Whats wrong?

Thanks!

  • 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-05-25T06:11:25+00:00Added an answer on May 25, 2026 at 6:11 am

    Well, to trigger the automatic style on new elements, using .trigger("create") should do the job.

    see : Is it possible to create element on the fly with jQuery Mobile?

    or http://jquerymobile.com/demos/1.0b2/#/demos/1.0b2/docs/pages/page-scripting.html

    EDIT: $('#leftnav').listview('refresh') is the thing your looking for rather than create.

    see: http://api.jquerymobile.com/listview/#method-refresh

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

Sidebar

Related Questions

I'm appending some items dynamically to an unordered list, but the jQuery .append() function
I'm adding list items to a page dynamically with $.get, then appending them to
OK, this problem is very odd. I am receiving a list of items using
I was having trouble appending object file in my program. I found this SO
Some claim that appending to immutable lists is more efficient. Is this true? How?
I am appending new data - $('#posts').append(data); But I want this new data to
I am working in elisp and I have a string that represents a list
So I am appending the following after an AJAX call, and this AJAX call
I know this isn't exactly how the pickle module was intended to be used,
I'd like to use jQuery's auto complete in a Drupal project to automatically find

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.