I am trying to create a dynamic drawer widget on initialization of a view, since there is not programmatic way to create a drawer widget I build the drawer HTML like so:
I then append this generated HTML to the DOM but it is not "kendorized" so it doesn't act as the drawer widget would. When I click to open the drawer I get the following error message: Uncaught TypeError: Cannot call method 'openFor' of undefined
I need help getting this to work properly. Thanks
<
div
data-role
=
"drawer"
id
=
"my-drawer"
style
=
"width: 270px"
>
<
ul
id
=
"nav"
data-role
=
"listview"
data-type
=
"group"
>
<
li
>Navigation
<
ul
>
<
li
data-icon
=
home
><
a
href
=
views
/index.html
data-transition
=
"none"
>Menu A</
a
>
</
li
>
</
ul
>
<
ul
>
<
li
data-icon
=
search
><
a
href
=
views
/weather.html
data-transition
=
"none"
>Menu B</
a
>
</
li
>
</
ul
>
<
ul
>
<
li
data-icon
=
compose
><
a
href
=
views
/location.html
data-transition
=
"none"
>Menu C</
a
>
</
li
>
</
ul
>
</
li
>
<
li
>Account
<
ul
>
<
li
data-icon
=
"settings"
>Settings</
li
>
<
li
data-icon
=
"off"
>Log Out</
li
>
</
ul
>
</
li
>
</
ul
>
</
div
>
I then append this generated HTML to the DOM but it is not "kendorized" so it doesn't act as the drawer widget would. When I click to open the drawer I get the following error message: Uncaught TypeError: Cannot call method 'openFor' of undefined
I need help getting this to work properly. Thanks