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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T08:38:47+00:00 2026-05-29T08:38:47+00:00

My html page loads beautifully, but I have some JavaScript that adds a few

  • 0

My html page loads beautifully, but I have some JavaScript that adds a few buttons. jQuery Mobile doesn’t style the newly created buttons.

Q: How can I run jQuery Mobile again so that the newly created buttons are styled according to the data-theme attribute?

  • 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-29T08:38:48+00:00Added an answer on May 29, 2026 at 8:38 am

    jQM Docs:

    • http://jquerymobile.com/demos/1.0.1/docs/pages/page-scripting.html

    Enhancing new markup
    The page plugin dispatches a pagecreate event, which most widgets use to auto-initialize themselves. As long
    as a widget plugin script is referenced, it will automatically enhance
    any instances of the widgets it finds on the page.

    However, if you generate new markup client-side or load in content via
    Ajax and inject it into a page, you can trigger the create event to
    handle the auto-initialization for all the plugins contained within
    the new markup. This can be triggered on any element (even the page
    div itself), saving you the task of manually initializing each plugin
    (listview button, select, etc.).

    For example, if a block of HTML markup (say a login form) was loaded
    in through Ajax, trigger the create event to automatically transform
    all the widgets it contains (inputs and buttons in this case) into the
    enhanced versions. The code for this scenario would be:

    $( ...new markup that contains widgets... ).appendTo( ".ui-page" ).trigger( "create" );
    

    Create vs. refresh: An important distinction
    Note that there is an important difference between the create event and refresh method that
    some widgets have. The create event is suited for enhancing raw markup
    that contains one or more widgets. The refresh method should be used
    on existing (already enhanced) widgets that have been manipulated
    programmatically and need the UI be updated to match.

    For example, if you had a page where you dynamically appended a new
    unordered list with data-role=listview attribute after page
    creation, triggering create on a parent element of that list would
    transform it into a listview styled widget. If more list items were
    then programmatically added, calling the listview’s refresh method
    would update just those new list items to the enhanced state and leave
    the existing list items untouched.

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

Sidebar

Related Questions

I have an HTML page with a couple javascript buttons that 'replace' the HTML/CSS.
I have a html page that opens a new window and loads a basic
My html page loads a bit slowly because of the jquery that's in it.
I have an application where an HTML page first loads, then an applet with
I wish to load some additional data from javascript in an HTML page. The
So I'm trying to load some returned html from an .aspx page but a
I am working with a HTML/jQuery page that somebody else wrote a while ago.
I have a html page which loads a flash(flex) swf file. Using https it
I want that my html page loads faster as it can. So I'm trying
I have a HTML page and a javascript function is attached to the <body>

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.