如何在jquery Mobile中重新呈现动态生成的锚标签?

unj*_*nj2 5 ajax jquery refresh widget jquery-mobile

我在ajax调用中从服务器获取了一个锚标记片段html.如何"刷新"以便jquery mobile可以将必要的类附加到链接?

例如,jquery mobile生成的链接有一个ui-link:

<a class="ui-link" href="http://www.google.com">http://www.google.com</a>
Run Code Online (Sandbox Code Playgroud)

如何确保在新生成的锚标记上附加正确的样式?

sha*_*bus 0

这里至少有一种刷新 jQuery Mobile 按钮样式的方法:

$(yourButtons).button('refresh'); 
Run Code Online (Sandbox Code Playgroud)

文档:http ://jquerymobile.com/test/docs/buttons/buttons-types.html