How Do I Create A Div With Dojo Create?
i want to generate the divNodes0 div from this example via dojo create (including the h1 and ul):
The third parameter to dojo.create
can be either a domNode (like you are using) or an id of a dom node: dojo.create('h1',{},'divNodes0','first')
Based on your usage of the dojoType
attribute it seems like you want to use "widgets" rather than dom nodes. Widgets are generally a template of domnodes with built in styling and event handling that are easily reusable. Instantiating and placing widgets is simple:
var heading = new dojox.mobile.Heading({
id: "h1Nodes0",
dojoType: "dojox.mobile.Heading",
back: "zurĊ¸ck",
moveTo: "divNodes0",
fixed: "top",
label: "Knotenübersicht"
});
heading.placeAt('divNodes0','first');
Post a Comment for "How Do I Create A Div With Dojo Create?"