GithubHelp home page GithubHelp logo

Comments (5)

daffl avatar daffl commented on July 29, 2024

Are you sure that his is generating the same HTML as expected by jQuery mobile?

from jquery.dform.

artmedia avatar artmedia commented on July 29, 2024

David,
I think it's correct, look at the html code generated in the example (using Firebug):

*********** this is the html generated by dform (this doesn't work) **********************
< div data-role="controlgroup" id="myDataRoleControlgroup" class="ui-dform-DivDataRoleControlgroup">
< a href="#" data-role="button" id="BtnStartForm2" class="ui-dform-ADataRoleButton">ITEM MENU 1< / a >
< a href="#" data-role="button" id="BtnMenu1" class="ui-dform-ADataRoleButton">ITEM MENU 2< / a >
< /div >

*********** this is the html in html file (this works) **********************
< div data-role="controlgroup" >
< a href="#" data-role="button">ITEM MENU 3< / a >
< a href="#" data-role="button">ITEM MENU 4< / a >
< a href="#" data-role="button">ITEM MENU 5< / a >
< /div >

I think that the problem could be page events...
In this example the dform-html is probably generated after jquery mobile js is loaded.

from jquery.dform.

artmedia avatar artmedia commented on July 29, 2024

David,
did you try dform and jquery mobile?
Do you have any suggestion?
Thanks
Luca (Italy)

from jquery.dform.

daffl avatar daffl commented on July 29, 2024

I don't think it's a dForm issue. You have to just treat dForm content the same as any other dynamically created content. Taken from this Stackoverflow answer I got this working (see in this Fiddle):

<div id="home" data-role="page"> 
</div> 
$("#home").dform({
    "type": "div",
    "data-role": "content",
    "class": "content",
    "html": {
        "type": "ul",
        "data-role": "listview",
        "data-inset": "true",
        "html": {
            "type": "li",
            "html": {
                "type": "a",
                "href": "#",
                "html": "Testing dForm"
            }
        }
    }
});

$.mobile.page("#home", {transition: "none"});  
$.mobile.activePage.trigger('create'); 

from jquery.dform.

artmedia avatar artmedia commented on July 29, 2024

thanx

from jquery.dform.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.