Dynamic refresh of a-tag inside a collapsible-set in JQM

Dynamic refresh of a-tag inside a collapsible-set in JQM

I'm creating a dynamic collapsible-set which contains an a-tag with data-role=button.
In order to refresh the collapsible-set, I'm using this code which works fine:
var el = $('#name');
el.html(data);  
              el.find('div[data-role=collapsible]').collapsible({theme:'c',refresh:true});      
The issue with this code is that the a-tags do not display like buttons, but show like regular hyperlinks.

I also tried el.html(data).page() which displays the a-tags as buttons. But if you go back and come to the page again, its all messed up again.

Any help is really appreciated.

Thanks