Hi to everyone this is my first question in stackoverflow. I'll try to create a Single Page Web App with jQuery Mobile (for the UI) and PhoneGap (because I want it cross-platform). In my app I want to create pages via some templates (string) and, whene i click on a button or a list element, the app create the corresponding page from the template and navigate it by the # attr. Whene I load the template the first time jqm render the page in the right way, but when I remove it from the DOM and append it when I need the page, the jqm don't render the page with its style, but I see only the link (or other elements). Thanks to everyone!
jQuery Mobile: how to create dynamic pages from a string template?
507 Views Asked by user2000769 At
2
There are 2 best solutions below
0
Gajotres
On
Unfortunately no matter what is said in official jQuery Mobile documentation method .trigger('create') can not restyle full page.
Instead this should be used:
$('#newPageID').trigger('pagecreate');
Here's a working example: http://jsfiddle.net/Gajotres/vN45m/
It can be testes easily, just replace pagecreate with create or comment that full line.
Related Questions in WEB-APPLICATIONS
- Azure Web App PATH Variable Modification
- How To Update a Web Application In Azure and Keep The App Up the whole time
- Developing a search and tag heavy website
- How do you include a HTML file in c
- Is it recommended to use Node.js for an online room booking web application?
- programmatically uninstall other application without asking user
- Fail to locate j_spring_security_check in Spring Security
- Configuring Web Applications for iOS
- Change Javascript Variables Using <input>
- how do you use angularJs to produce a functioning webapp?
- NoClassDefFound error in web application deployed on Tomcat
- Replying to a request in ruby on rails (Server side)
- Exclude one role in web.xml
- LDAP connection only works on localhost
- Displaying statistics collected by Moskito-central
Related Questions in JQUERY-MOBILE
- Get selected columns for a columntoggle table
- jQuery mobile - generating html dynamically not working with iframe
- jQuery mobile Multiselect doesn't update selected attribute
- Exit windows app confirmation button not working
- jquery mobile swipe stops if i swipe right on the first page and and left on the last page
- Jquery Mobile: Horizontal Buttons, fill container
- Cordova camera plugin not working in Android mobile but working in emulator
- how to parse a xml file using jquery and phonegap?
- pass input value with jquery does not work
- Photoswipe Custom Button
- why the input box is not disable while checking the check box?
- Display Mobile Compatible when it's on mobile
- Xml audio list player not working on the mobile and autoplay is not working
- Dygraph not shown on collapsed jQuery mobile collapsible widget
- Jquery slideToggle and hover issues
Related Questions in RENDER
- React TypeError: React.renderComponent is not a function
- DefaultListCellRenderer does not render empty String correctly when using an editable combo box
- How to show slider only on index page in yii2
- How to pre-render MKMapView from other viewcontroller?
- FatFree pass array to a view using Jig data mapper
- How can I render a twig template in a custom controller in Silex?
- create pdf from current page ASP.NET
- LibGDX TextureRegion draw bug when using split method and scaling
- render with the specified mime type not downloading properly in rails
- Pyglet use entire texture when drawing
- How to embed a PDF into a HTML page and have the PDF render the width of the browser
- Magento - How to add a custom render to a custom column in the orders grid?
- SFML 2.3 Window doesn't display anything
- Image not load(first time) when I use java.awt.Image and java.awt.RenderingHints;
- Image not rendering on web browser
Related Questions in DYNAMIC-PAGES
- Is it possible to run an aspx file in background as "In memory" operation
- trouble understanding Params object type in nextJS13
- extracting data from a webpage that changes dynamically (element appears only on hover)
- what is a good pattern for serving a web page given a HttpServletRequest?
- How to click on the first result on a dynamic page using python selenium?
- PHP Header Location with parameter. Delete and back to previous list
- Dynamic link to static link?
- Create Dynamic pages in asp.net mvc
- PhoneGap jquerymobile SQL dynamic link
- .htaccess and 301 redirect (dynamic pages) wordpress
- Dynamic route react-router-dom
- dynamic pages with .htaccess
- Nextjs dynamic page doesn't appear when refreshing in the server (after build)
- jQuery Mobile: how to create dynamic pages from a string template?
- table-layout:fixed not expanding table-cells inside absolute 100% width table-row (elements not collapsing either)
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
By default jQuery Mobile will auto enhance the appropriate markup on your page, however if you add dynamic content later you will need to manually trigger the
createevent on your new page.For example
From the Docs