user3424451 user3424451 - 1 year ago 119
Javascript Question

Dynamically Adding Data Roles (Collapsible data role)

I have a table with a table data-role that i would like to add a collapsible data role to. However i would have to add this dynamically through JQuery Mobile code.


Is there something off with my code? ^

Answer Source

You should be using the jQuery .attr() method to add attributes to an element. Try this:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download