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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T05:03:35+00:00 2026-06-18T05:03:35+00:00

I am making a hybrid mobile app and I want to apply the jQueryMobile-initialize

  • 0

I am making a hybrid mobile app and I want to apply the jQueryMobile-initialize method after I get html back from a webservice.. (by “hybrid mobile app” I mean that I start w an html page, use jQueryMobile for styling, and use ajax calls to web services to get data on button clicks etc. Finally, I fold all that into a native app.)

So, does anyone know if there is something like (pseudo)
$.initWithJQueryMobile($(‘#my_div_id’))
NOTE: I am not going to a new, data-role=page when I do the ws request/response.

Background: As you may know, when it initializes an html file, jqm changes this

    <select id="116" data-role="slider" >
    <option value='no'>No</option>                               
    <option value='yes'>Yes</option></select> 

into this
enter image description here

I want to do that AFTER my webservice returns – long after the pagecreate event has fired.

When you click or tap the flip toggle (they call it), it toggles between Yes and No.

To achieve this jqm is radically re-writing the dom with spans, divs and styles AND applying a javascript method to the onclick for the flip toggle.

I can steal the html from page-view-source, so if someone knows the jqm js method that makes it toggle I can take it from there (I know, big hack). Or …. is there an $.initWithJQueryMobile() function that we can use?

  • 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-18T05:03:37+00:00Added an answer on June 18, 2026 at 5:03 am

    The tags I want to jqm-initialize are <select> jqm changes them into flip-toggles. jqm has us mark up the <select> with data-role='slider'

    Anyway I am loading a bunch of selects in response to the user entering a 5th number in the zipcode box. It turns out that this works:

    // get an array of the &lt;select>s you want to initialize
    var endorsement_controls =  $('div#divEndorsements select');
    endorsement_controls.each(function(){
        // the next two lines make them flip toggles
        $(this).slider();
        $(this).slider('refresh');
    });
    

    $.slider() is what they call a widget. There is an analog for most if not all the controls, I guess.

    I got the game-changing hint from Craig Brooks

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

Sidebar

Related Questions

Making an app where we want to send a photo to a server along
I'm working on making a browser as a hybrid app using worklight framework for
making an android app to do a lottery prize system. I want to randomly
I making a web app in Flex using global coordinates I get the coordinates
im making an application where i have to load my database from html file
When making a call to jQuery get , how does one specify HTML elements
Making a painting app using HTML5 and Canvas. I think I want to have
Im making a Web app. I want block it's selecting texts. When I use
Making an Flex App. Just wondering if anyone has created something that fits automatically
In SQLAlchemy , a hybrid attribute is either a property or method applied to

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.