在锚标记(data-role ="button")中设置文本,然后折叠文本 [英] Set text in anchor tag(data-role="button") the text is collapsed

查看:103
本文介绍了在锚标记(data-role ="button")中设置文本,然后折叠文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的JQuery Mobile(1.3.2)应用程序中,使用<a data-role="button" >并使用jquery动态设置按钮文本 .问题是,当开始滚动页面时,按钮文本会折叠起来,如下图所示.我没有使用任何其他样式.

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.

推荐答案

像您一样,我也遇到过类似的问题.我确实喜欢以下内容.添加动态行后,您需要设置为

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

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

它解决了我的问题.

尝试这个

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

或者尝试这样:

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

在脚本中的小提琴行号10中进行检查.

check this Fiddle line number 10 in script.

这篇关于在锚标记(data-role ="button")中设置文本,然后折叠文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆