Change button text jquery mobile

后端 未结 10 927
傲寒
傲寒 2020-11-29 04:32

I\'m using the new jquery mobile 1.0 alpha 1 release to build a mobile app and I need to be able to toggle the text of a button. Toggling the text works fine, but as soon a

10条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-29 05:16

    When you create the button it adds some additional elements, some inner elements that look like this:

    
      
        Mark Old
      
    
    

    To change the text, you'll want this selector:

    $("#consumed .ui-btn-text").text("Mark New");
    

提交回复
热议问题