Set text in anchor tag(data-role=“button”) the text is collapsed

淺唱寂寞╮ 提交于 2020-01-06 03:53:06

问题


In my JQuery Mobile(1.3.2) application used <a data-role="button" > and set the button text dynamically using jquery. The problem is when start scrolling the page the button text is collapsed like the below image. I didn't use any extra styles.


回答1:


I faced similar issue before like your's. I did like the following. After adding dynamic rows you need set like

$(".yourinsertedbutton").trigger("pagecreate");

it resolves my issue.

Try this one

 $(".yourbtn").button('refresh'); 

OR try like this:

$('#yourbtn').parent().find('span').html("your text here");

check this Fiddle line number 10 in script.



来源:https://stackoverflow.com/questions/26094484/set-text-in-anchor-tagdata-role-button-the-text-is-collapsed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!