I want to use the mobile listview like this:
<
ul
data-role
=
"listview"
data-inset
=
"true"
>
<
li
><
a
href
=
"#"
>
<
img
src
=
"../_assets/img/album-bb.jpg"
>
<
h2
>Broken Bells</
h2
>
<
p
>Broken Bells</
p
></
a
>
</
li
>
<
li
><
a
href
=
"#"
>
<
img
src
=
"../_assets/img/album-hc.jpg"
>
<
h2
>Warning</
h2
>
<
p
>Hot Chip</
p
></
a
>
</
li
>
<
li
><
a
href
=
"#"
>
<
img
src
=
"../_assets/img/album-p.jpg"
>
<
h2
>Wolfgang Amadeus Phoenix</
h2
>
<
p
>Phoenix</
p
></
a
>
</
li
>
</
ul
>
But I need to create this dynamically by using javascript. Is this the way to go?
var list = document.createElement('ul');
list.setAttribute('data-role',"listview");
list.setAttribute('data-inset',"true");
Doe someone have a working example of this?
Thanks